Skip to content

Commit 268103b

Browse files
authored
Merge pull request #2589 from AlexandreSinger/feature-disable-ci-on-push
[CI] Changed the Workflow Triggers
2 parents 318e1c6 + 4a0a709 commit 268103b

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/containers.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
name: Containers
22

33
on:
4+
# We want to run the CI when anything is pushed to master.
5+
# Since master is a protected branch this only happens when a PR is merged.
6+
# This is a double check in case the PR was stale and had some issues.
47
push:
8+
branches:
9+
- master
510
pull_request:
611
workflow_dispatch:
712
schedule:
813
- cron: '0 0 * * 0' # weekly
914

15+
# We want to cancel previous runs for a given PR or branch / ref if another CI
16+
# run is requested.
17+
# See: https://docs.github.com/en/actions/using-jobs/using-concurrency
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20+
cancel-in-progress: true
21+
1022
jobs:
1123

1224
Image:

.github/workflows/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
name: Test
22

33
on:
4+
# We want to run the CI when anything is pushed to master.
5+
# Since master is a protected branch this only happens when a PR is merged.
6+
# This is a double check in case the PR was stale and had some issues.
47
push:
8+
branches:
9+
- master
510
pull_request:
611
workflow_dispatch:
712
schedule:
813
- cron: '0 0 * * *' # daily
914

15+
# We want to cancel previous runs for a given PR or branch / ref if another CI
16+
# run is requested.
17+
# See: https://docs.github.com/en/actions/using-jobs/using-concurrency
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20+
cancel-in-progress: true
21+
1022
env:
1123
# default compiler for all non-compatibility tests
1224
MATRIX_EVAL: "CC=gcc-11 && CXX=g++-11"

0 commit comments

Comments
 (0)