Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
[github-actions] use concurrency feature to cancel outstanding jobs (
Browse files Browse the repository at this point in the history
  • Loading branch information
jwhui authored Sep 30, 2022
1 parent 2c461dd commit c1c1186
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c1c1186

Please sign in to comment.