Only cancel CI jobs on pushes for PRs (#3893)

This commit is contained in:
Jon Koops 2022-11-29 11:57:10 +01:00 committed by GitHub
parent fcc1085323
commit d255e06593
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -15,7 +15,9 @@ on:
description: The branch to check out for the Keycloak repo (e.g. main).
required: false
concurrency:
group: ${{ github.ref }}
# Only cancel jobs for new commits on PRs, and always do a complete run on other branches (e.g. `main`).
# See: https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-keycloak:

View file

@ -4,6 +4,11 @@ on:
branches: [main]
pull_request:
branches: [main]
concurrency:
# Only cancel jobs for new commits on PRs, and always do a complete run on other branches (e.g. `main`).
# See: https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
NODE_VERSION: 18
jobs: