mirror of
https://github.com/julia-actions/cache.git
synced 2026-02-12 01:16:54 +08:00
fixup! Use upload for passing context
This commit is contained in:
27
.github/workflows/ReusableTest.yml
vendored
27
.github/workflows/ReusableTest.yml
vendored
@@ -5,7 +5,7 @@ on:
|
|||||||
inputs: {}
|
inputs: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
trigger:
|
reusable:
|
||||||
uses: ./.github/workflows/ReusableWorkflow.yml
|
uses: ./.github/workflows/ReusableWorkflow.yml
|
||||||
|
|
||||||
duplicate:
|
duplicate:
|
||||||
@@ -17,17 +17,34 @@ jobs:
|
|||||||
version: "1"
|
version: "1"
|
||||||
- name: Save cache
|
- name: Save cache
|
||||||
uses: ./
|
uses: ./
|
||||||
|
- name: Export Context
|
||||||
|
id: export
|
||||||
|
run: |
|
||||||
|
jq -c <<<"$github_json" >github.json
|
||||||
|
env:
|
||||||
|
github_json: ${{ toJSON(github) }}
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: trigger-context
|
||||||
|
path: "*.json"
|
||||||
|
|
||||||
compare:
|
compare:
|
||||||
needs: duplicate
|
needs:
|
||||||
|
- reusable
|
||||||
|
- duplicate
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: trigger-context
|
||||||
|
path: trigger
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: reusable-context
|
name: reusable-context
|
||||||
|
path: resuable
|
||||||
- run: |
|
- run: |
|
||||||
a="$github_json"
|
a="$(cat trigger/github.json)"
|
||||||
b="$(cat github.json)"
|
b="$(cat reusable/github.json)"
|
||||||
|
|
||||||
echo "::group::Raw A"
|
echo "::group::Raw A"
|
||||||
jq <<<"$a"
|
jq <<<"$a"
|
||||||
@@ -40,5 +57,3 @@ jobs:
|
|||||||
echo "::group::Diff"
|
echo "::group::Diff"
|
||||||
diff <(echo "$a") <(echo "$b")
|
diff <(echo "$a") <(echo "$b")
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
env:
|
|
||||||
github_json: ${{ toJSON(github) }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user