Cancel in-progress workflow runs for pull requests and dispatches

This will reduce unnecessary resource consumption by cancelling running workflows when new commits are pushed to a PR or workflow dispatch. It does not cancel pushes to main or branches.
pull/16601/head
Seth Vargo 7 months ago committed by GitHub
parent d1cf09abcf
commit 82fd070dba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      .github/workflows/test_runner.yml

@ -52,6 +52,10 @@ on:
permissions: permissions:
contents: read contents: read
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ contains(fromJSON('["pull_request", "pull_request_target", "workflow_dispatch"]'), github.event_name) }}
jobs: jobs:
check-tag: check-tag:
name: Check for Safety name: Check for Safety

Loading…
Cancel
Save