mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-06 15:20:29 +00:00
78 lines
2.5 KiB
YAML
78 lines
2.5 KiB
YAML
name: artifact
|
|
on: push
|
|
jobs:
|
|
upload:
|
|
runs-on: e2e-artifact
|
|
steps:
|
|
- run: |
|
|
echo "results=$ACTIONS_RESULTS_URL cache=$ACTIONS_CACHE_URL v2=${ACTIONS_CACHE_SERVICE_V2:-unset}"
|
|
if [ "$ACTIONS_CACHE_SERVICE_V2" = "true" ]; then
|
|
test "$ACTIONS_RESULTS_URL/" = "$ACTIONS_CACHE_URL"
|
|
else
|
|
test "$ACTIONS_RESULTS_URL/" != "$ACTIONS_CACHE_URL"
|
|
fi
|
|
mkdir -p out
|
|
echo "artifact-payload" > out/data.txt
|
|
- uses: actions/upload-artifact@v7
|
|
with:
|
|
name: e2e-artifact-${{ github.run_id }}
|
|
path: out/data.txt
|
|
download:
|
|
needs: upload
|
|
runs-on: e2e-artifact
|
|
steps:
|
|
- uses: actions/download-artifact@v8
|
|
with:
|
|
name: e2e-artifact-${{ github.run_id }}
|
|
path: got
|
|
- run: grep -q artifact-payload got/data.txt
|
|
builtin-upload:
|
|
runs-on: e2e-artifact
|
|
steps:
|
|
- run: |
|
|
mkdir -p out/sub
|
|
echo "builtin-payload" > out/data.txt
|
|
echo "nested" > out/sub/nested.txt
|
|
echo "hidden" > out/.hidden
|
|
echo "raw" > report.txt
|
|
- id: zipped
|
|
uses: builtin:upload-artifact
|
|
with:
|
|
name: e2e-builtin-${{ github.run_id }}
|
|
path: out
|
|
- run: test -n "${{ steps.zipped.outputs.artifact-id }}" && test -n "${{ steps.zipped.outputs.artifact-digest }}"
|
|
- uses: builtin:upload-artifact
|
|
with:
|
|
path: report.txt
|
|
archive: false
|
|
js-downloads-builtin:
|
|
needs: builtin-upload
|
|
runs-on: e2e-artifact
|
|
steps:
|
|
- uses: actions/download-artifact@v8
|
|
with:
|
|
name: e2e-builtin-${{ github.run_id }}
|
|
path: got
|
|
- run: grep -q builtin-payload got/data.txt && grep -q nested got/sub/nested.txt && test ! -e got/.hidden
|
|
- uses: actions/download-artifact@v8
|
|
with:
|
|
name: report.txt
|
|
- run: grep -q raw report.txt
|
|
builtin-downloads-js:
|
|
needs: upload
|
|
runs-on: e2e-artifact
|
|
steps:
|
|
- id: own
|
|
uses: builtin:download-artifact
|
|
with:
|
|
name: e2e-artifact-${{ github.run_id }}
|
|
path: got
|
|
- run: grep -q artifact-payload got/data.txt && test "${{ steps.own.outputs.download-path }}" = "$GITHUB_WORKSPACE/got"
|
|
- uses: builtin:download-artifact
|
|
with:
|
|
name: e2e-artifact-${{ github.run_id }}
|
|
path: rest
|
|
github-token: ${{ github.token }}
|
|
run-id: ${{ github.run_id }}
|
|
- run: grep -q artifact-payload rest/data.txt
|