Skip to content

Commit

Permalink
CI: Improve efficiency on GHA
Browse files Browse the repository at this point in the history
When pushing to the same branch on a PR, cancel running jobs of the same
kind.
  • Loading branch information
amotl committed Nov 14, 2022
1 parent e2a9f67 commit 03158b9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/release-docker.yml
Expand Up @@ -15,10 +15,17 @@ on:
push:
tags:
- '*.*.*'
workflow_dispatch:
pull_request:
branches: [ main ]

# Allow job to be triggered manually.
workflow_dispatch:

# Cancel in-progress jobs when pushing to the same branch.
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

env:
GHCR_IMAGE_NAME: ghcr.io/panodata/grafana-wtf

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/tests.yml
Expand Up @@ -10,6 +10,14 @@ on:
schedule:
- cron: '0 7 * * 1'

# Allow job to be triggered manually.
workflow_dispatch:

# Cancel in-progress jobs when pushing to the same branch.
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

jobs:

tests:
Expand Down

0 comments on commit 03158b9

Please sign in to comment.