From 4e046b8b3ff290d4407e3217cab7440f912ba585 Mon Sep 17 00:00:00 2001 From: Austen Stone Date: Fri, 29 Sep 2023 12:14:43 -0700 Subject: [PATCH] prevent rerun --- .github/actions/prevent-reruns/action.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/actions/prevent-reruns/action.yml diff --git a/.github/actions/prevent-reruns/action.yml b/.github/actions/prevent-reruns/action.yml new file mode 100644 index 0000000..e902a2e --- /dev/null +++ b/.github/actions/prevent-reruns/action.yml @@ -0,0 +1,12 @@ +name: Prevent Re-run +description: Prevents re-run of a workflow + +runs: + using: "composite" + + steps: + - if: github.run_attempt != '1' + shell: bash + run: | + gh api -X POST /repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/cancel + sleep 60