diff --git a/.github/actions/download-artifact-extract/action.yml b/.github/actions/download-artifact-extract/action.yml index 6a9ec3308511f..5bf9442d05970 100644 --- a/.github/actions/download-artifact-extract/action.yml +++ b/.github/actions/download-artifact-extract/action.yml @@ -29,15 +29,45 @@ inputs: runs: using: "composite" steps: - - name: Download artifact + - name: Download artifact (attempt 1) + id: download_attempt_1 + continue-on-error: true + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: ${{ inputs.artifact-name }} + github-token: ${{ inputs.gh-token }} + run-id: ${{ inputs.run-id }} + path: ${{ inputs.extract-path }} + + - name: Wait before retry 1 + if: steps.download_attempt_1.outcome == 'failure' shell: bash run: | - echo "::group::📦 Downloading ${{ inputs.artifact-name }}" - echo "Artifact: ${{ inputs.artifact-name }}" - echo "Run ID: ${{ inputs.run-id }}" - echo "::endgroup::" - - - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + echo "::warning::Attempt 1 failed, retrying in 10s..." + sleep 10 + + - name: Download artifact (attempt 2) + id: download_attempt_2 + if: steps.download_attempt_1.outcome == 'failure' + continue-on-error: true + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: ${{ inputs.artifact-name }} + github-token: ${{ inputs.gh-token }} + run-id: ${{ inputs.run-id }} + path: ${{ inputs.extract-path }} + + - name: Wait before retry 2 + if: steps.download_attempt_1.outcome == 'failure' && steps.download_attempt_2.outcome == 'failure' + shell: bash + run: | + echo "::warning::Attempt 2 failed, retrying in 20s..." + sleep 20 + + - name: Download artifact (attempt 3) + id: download_attempt_3 + if: steps.download_attempt_1.outcome == 'failure' && steps.download_attempt_2.outcome == 'failure' + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: ${{ inputs.artifact-name }} github-token: ${{ inputs.gh-token }} diff --git a/.github/workflows/zombienet_cumulus.yml b/.github/workflows/zombienet_cumulus.yml index 173b8989c8903..8c09c83d8c8d0 100644 --- a/.github/workflows/zombienet_cumulus.yml +++ b/.github/workflows/zombienet_cumulus.yml @@ -80,11 +80,12 @@ jobs: - name: Checkout uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + - name: Download test parachain artifact if: ${{ matrix.test.needs-wasm-binary }} + uses: ./.github/actions/download-artifact-extract with: - name: build-test-parachain-${{ needs.preflight.outputs.SOURCE_REF_SLUG }} - github-token: ${{ secrets.GITHUB_TOKEN }} + artifact-name: build-test-parachain-${{ needs.preflight.outputs.SOURCE_REF_SLUG }} + gh-token: ${{ secrets.GITHUB_TOKEN }} run-id: ${{ needs.preflight.outputs.BUILD_RUN_ID }} - name: zombienet_test