Skip to content

Commit

Permalink
ci: replace workflow-run-cleanup-action with github concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Apr 7, 2022
1 parent d5a5257 commit ac13ada
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,12 @@ on:
- "*.md"
types: [opened, ready_for_review, reopened, synchronize]

jobs:
cleanup-runs:
name: Clean-Up Running Instances
if: >
github.event.pull_request.draft == false &&
!startsWith(github.ref, 'refs/tags/') &&
github.ref != 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
lint:
name: Lint Code
if: github.event.pull_request.draft == false
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ permissions:
contents: read
security-events: write

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
build:
if: github.event.pull_request.draft == false
Expand Down

0 comments on commit ac13ada

Please sign in to comment.