Skip to content

Commit c5772ae

Browse files
committed
refactor(ci): Improve Docker workflow
- Only run build on main branch - Cancel previous runs when a new one is queued
1 parent 05b2d0d commit c5772ae

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/docker.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ name: Docker Build and Push
33
on:
44
push:
55
branches:
6-
- '**'
6+
- main
77

8+
# This allows a subsequently queued workflow run to interrupt previous runs
89
concurrency:
9-
group: "docker-image"
10-
cancel-in-progress: false
10+
group: '${{ github.workflow }} @ ${{ github.event.issue.number || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.id || github.event.sender.login }}'
11+
cancel-in-progress: true
1112

1213
jobs:
1314
docker:

0 commit comments

Comments
 (0)