diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 1202dc7fa53..51266d970ce 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -1,12 +1,24 @@ name: Containers on: + # We want to run the CI when anything is pushed to master. + # Since master is a protected branch this only happens when a PR is merged. + # This is a double check in case the PR was stale and had some issues. push: + branches: + - master pull_request: workflow_dispatch: schedule: - cron: '0 0 * * 0' # weekly +# We want to cancel previous runs for a given PR or branch / ref if another CI +# run is requested. +# See: https://docs.github.com/en/actions/using-jobs/using-concurrency +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: Image: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e79ca152aca..ad92c52c8fe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,12 +1,24 @@ name: Test on: + # We want to run the CI when anything is pushed to master. + # Since master is a protected branch this only happens when a PR is merged. + # This is a double check in case the PR was stale and had some issues. push: + branches: + - master pull_request: workflow_dispatch: schedule: - cron: '0 0 * * *' # daily +# We want to cancel previous runs for a given PR or branch / ref if another CI +# run is requested. +# See: https://docs.github.com/en/actions/using-jobs/using-concurrency +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: # default compiler for all non-compatibility tests MATRIX_EVAL: "CC=gcc-11 && CXX=g++-11"