From 7ae689d1ddf1bf212c5e1ad78338524aa3e90453 Mon Sep 17 00:00:00 2001 From: Mamy Ratsimbazafy Date: Fri, 25 Sep 2020 14:10:35 +0200 Subject: [PATCH] Don't cancel Actions on master/devel (#1750) --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01b176173..642b6505e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,7 +74,15 @@ jobs: name: '${{ matrix.target.os }}-${{ matrix.target.cpu }} (${{ matrix.target.TEST_KIND }})' runs-on: ${{ matrix.builder }} steps: - - name: Cancel Previous Runs + - name: Get branch name + shell: bash + run: echo "##[set-output name=branch_name;]$(echo ${GITHUB_REF#refs/heads/})" + id: get_branch + + - name: Cancel Previous Runs (except master/devel) + if: > + steps.get_branch.outputs.branch_name != 'master' && + steps.get_branch.outputs.branch_name != 'devel' uses: styfle/cancel-workflow-action@0.5.0 with: access_token: ${{ github.token }}