From 5c008dad30e51e4f792b68aef30fb561d92bef73 Mon Sep 17 00:00:00 2001 From: tjjfvi Date: Mon, 25 Mar 2024 11:58:25 -0400 Subject: [PATCH] delete on cancel --- .github/workflows/bench.yml | 2 +- .github/workflows/delete-canceled.yml | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/delete-canceled.yml diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index dcb8ddfa..8a4314da 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -76,6 +76,6 @@ jobs: fi - name: delete on cancel if: ${{ cancelled() }} - run: gh api "repos/higherorderco/hvm-core/actions/runs/${{ github.run_id }}" -X DELETE + run: gh workflow run delete-cancelled.yml --ref ${{ github.ref }} -f run_id=${{ github.run_id }} env: GH_TOKEN: ${{ secrets.PAT }} diff --git a/.github/workflows/delete-canceled.yml b/.github/workflows/delete-canceled.yml new file mode 100644 index 00000000..cf585cab --- /dev/null +++ b/.github/workflows/delete-canceled.yml @@ -0,0 +1,15 @@ +name: Bench + +on: + workflow_dispatch: + inputs: + run_id: + type: string + +jobs: + delete: + runs-on: ubuntu-latest + steps: + - run: gh api "repos/higherorderco/hvm-core/actions/runs/${{ inputs.run_id }}" -X DELETE + env: + GH_TOKEN: ${{ secrets.PAT }}