Skip to content

Commit

Permalink
Devops: Using concurrency for CI actions (#6066)
Browse files Browse the repository at this point in the history
This will cause running actions to be cancelled as soon as new commits
are pushed to the same branch, saving computational resources.
  • Loading branch information
unkcpz committed Jul 4, 2023
1 parent a8ae508 commit 4db54b7
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/benchmark.yml
Expand Up @@ -5,6 +5,12 @@ on:
branches: [main]
paths-ignore: ['docs/**']

# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

run-and-upload:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build_and_test_docker_on_pr.yml
Expand Up @@ -12,6 +12,12 @@ on:
path_ignore:
- 'docs/**'

# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

build-and-test:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci-code.yml
Expand Up @@ -7,6 +7,12 @@ on:
branches-ignore: [gh-pages]
paths-ignore: ['docs/**']

# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

check-requirements:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/nightly.yml
Expand Up @@ -13,6 +13,12 @@ on:
- 'tests/storage/psql_dos/migrations/**'
workflow_dispatch:

# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

tests:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/rabbitmq.yml
Expand Up @@ -7,6 +7,12 @@ on:
branches-ignore: [gh-pages]
paths-ignore: ['docs/**']

# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

tests:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-install.yml
Expand Up @@ -12,6 +12,12 @@ on:
schedule:
- cron: '30 02 * * *' # nightly build

# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

validate-dependency-specification:
Expand Down

0 comments on commit 4db54b7

Please sign in to comment.