From 8b55143aef5d51f56037897124dc09a0fc7f503b Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Mon, 26 Aug 2024 15:06:00 +0200 Subject: [PATCH] add `styfle/cancel-workflow-action` to github actions to cancel previous runs --- .github/workflows/main-test.yml | 4 ++++ .github/workflows/pr-graphql-compat-check.yml | 4 ++++ .github/workflows/pr.yml | 4 ++++ .github/workflows/release.yml | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/.github/workflows/main-test.yml b/.github/workflows/main-test.yml index 53e4db10da6..1d75ff4b3c3 100644 --- a/.github/workflows/main-test.yml +++ b/.github/workflows/main-test.yml @@ -9,6 +9,10 @@ jobs: runs-on: ubuntu-latest steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ github.token }} - name: Checkout Code uses: actions/checkout@v4 - uses: actions/setup-node@v4 diff --git a/.github/workflows/pr-graphql-compat-check.yml b/.github/workflows/pr-graphql-compat-check.yml index 7643e219f43..5d59ddf63fb 100644 --- a/.github/workflows/pr-graphql-compat-check.yml +++ b/.github/workflows/pr-graphql-compat-check.yml @@ -26,6 +26,10 @@ jobs: release: ['15.5.3', '^15.8.0', '16.1.0', '16.2.0', '16.3.0', '17.0.0-alpha.5'] steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ github.token }} - name: Checkout Code uses: actions/checkout@v4 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5c7690b69dc..44df8e0b070 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -9,6 +9,10 @@ jobs: runs-on: ubuntu-latest steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ github.token }} - name: Checkout Code uses: actions/checkout@v4 - uses: actions/setup-node@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aa44f00b12a..3115021a92f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,10 @@ jobs: name: Release runs-on: ubuntu-latest steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ github.token }} - name: Checkout Code uses: actions/checkout@v4 with: