Skip to content

Commit cb34167

Browse files
authored
Merge pull request #4 from ESPresense/ci/enable-pr-builds
ci: enable Docker builds on PRs
2 parents 2f60fc7 + a9d7e0d commit cb34167

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/docker.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
push:
44
branches: [main]
55
tags: ['v*']
6+
pull_request:
7+
branches: [main]
68

79
jobs:
810
build-and-push:
@@ -33,12 +35,13 @@ jobs:
3335
type=semver,pattern={{major}}
3436
type=sha,prefix=sha-
3537
type=raw,value=latest,enable={{is_default_branch}}
38+
type=ref,event=pr
3639
3740
- name: Build and push
3841
uses: docker/build-push-action@v6
3942
with:
4043
context: .
41-
push: true
44+
push: ${{ github.event_name != 'pull_request' }}
4245
tags: ${{ steps.meta.outputs.tags }}
4346
labels: ${{ steps.meta.outputs.labels }}
4447
cache-from: type=gha

0 commit comments

Comments
 (0)