From 2699771eee86b8eebe5f24fb378b9370e10a86aa Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Mon, 28 Oct 2024 13:43:50 +0100 Subject: [PATCH 1/2] retry release process on failure --- .github/workflows/release.yml | 10 ++++++++++ .github/workflows/retry.yml | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/retry.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5cbbb5252..a41e4f2a0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -218,6 +218,16 @@ jobs: files: | ${{ steps.artifacts.outputs.file_name }} ${{ steps.man.outputs.foundry_man }} + + retry-on-failure: + if: failure() && fromJSON(github.run_attempt) < 3 + needs: [release] + runs-on: ubuntu-latest + steps: + - env: + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ github.token }} + run: gh workflow run retry.yml -F run_id=${{ github.run_id }} cleanup: name: Release cleanup diff --git a/.github/workflows/retry.yml b/.github/workflows/retry.yml new file mode 100644 index 000000000..0219289bc --- /dev/null +++ b/.github/workflows/retry.yml @@ -0,0 +1,18 @@ +name: Retry workflow + +on: + workflow_dispatch: + inputs: + run_id: + required: true +jobs: + rerun: + runs-on: ubuntu-latest + steps: + - name: rerun ${{ inputs.run_id }} + env: + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ github.token }} + run: | + gh run watch ${{ inputs.run_id }} > /dev/null 2>&1 + gh run rerun ${{ inputs.run_id }} --failed From 416ec951b3a1a509b1d833ae2afda8253622f76d Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Mon, 28 Oct 2024 14:15:41 +0100 Subject: [PATCH 2/2] remove retry code --- .github/workflows/release.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a41e4f2a0..5cbbb5252 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -218,16 +218,6 @@ jobs: files: | ${{ steps.artifacts.outputs.file_name }} ${{ steps.man.outputs.foundry_man }} - - retry-on-failure: - if: failure() && fromJSON(github.run_attempt) < 3 - needs: [release] - runs-on: ubuntu-latest - steps: - - env: - GH_REPO: ${{ github.repository }} - GH_TOKEN: ${{ github.token }} - run: gh workflow run retry.yml -F run_id=${{ github.run_id }} cleanup: name: Release cleanup