Skip to content

test(deploy): verify artifact reuse on job retry #1

test(deploy): verify artifact reuse on job retry

test(deploy): verify artifact reuse on job retry #1

name: Deploy artifact retry check
on:
push:
branches: [test/deploy-artifact-retry]
jobs:
quality:
runs-on: [self-hosted, linux, x64, t31-project2-ci]
steps:
- run: printf '%s\n' "$GITHUB_SHA" > retry-marker.txt
- uses: actions/upload-artifact@v3.2.1-node20
with:
name: project2-${{ github.sha }}-${{ github.run_id }}
path: retry-marker.txt
retry-check:
needs: quality
runs-on: [self-hosted, linux, x64, t31-project2-ci]
steps:
- uses: actions/download-artifact@v3-node20
with:
name: project2-${{ github.sha }}-${{ github.run_id }}
path: retry-check
- run: test "$(cat retry-check/retry-marker.txt)" = "$GITHUB_SHA"
- name: Require a second attempt
run: test "$GITHUB_RUN_ATTEMPT" -gt 1