From c1c1186705b356d1c719ed342c92876f9baccd9c Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Fri, 30 Sep 2022 10:20:25 -0700 Subject: [PATCH] [github-actions] use `concurrency` feature to cancel outstanding jobs (#127) --- .github/workflows/build.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c808988..c353fd7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,15 +30,11 @@ name: Check on: [push, pull_request] -jobs: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/pyspinel' && github.run_id) || github.ref }} + cancel-in-progress: true - cancel-previous-runs: - runs-on: ubuntu-20.04 - steps: - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "github.ref != 'refs/heads/master'" +jobs: pretty: runs-on: ubuntu-20.04