From 7b2e0736a0e2bbf53887fdec567f10452dc7e310 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 15 Nov 2024 11:09:04 +0800 Subject: [PATCH] Cancel previous CI run in PR --- .github/workflows/ci-cd.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 067c995..bb64526 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -27,6 +27,16 @@ env: EMAIL: jack20220723@gmail.com jobs: + cancel-previous: + name: Cancel Previous Runs In Order to Allocate Action Resources Immediately for Current Run + if: github.ref != 'refs/heads/master' + runs-on: ubuntu-latest + steps: + - name: Cancel previous + uses: styfle/cancel-workflow-action@0.10.1 + with: + access_token: ${{ github.token }} + yml-md-style-and-link-checks: uses: QubitPi/hashistack/.github/workflows/yml-md-style-and-link-checks.yml@master