Skip to content

Commit 0482c53

Browse files
committed
feat: build on pull request as well as release
This change adds "pull_request" as an event that will trigger the workflow. Additionally, it alters the "Build and push" step such that the "push" value will be based on whether or not this is for a release. Signed-off-by: Matthew Weier O'Phinney <[email protected]>
1 parent e0e8146 commit 0482c53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/build-and-push-containers.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Build and push containers
33
on:
44
release:
55
types: [published]
6+
pull_request:
67

78
jobs:
89
release-container:
@@ -41,7 +42,7 @@ jobs:
4142
file: ./Dockerfile
4243
platforms: linux/amd64
4344
pull: true
44-
push: true
45+
push: ${{ github.event_name == 'release' }}
4546
tags: ${{ join(fromJSON(steps.tags.outputs.tags), ',') }}
4647
cache-from: type=registry,ref=ghcr.io/laminas/laminas-continuous-integration-action:build-cache
4748
cache-to: type=registry,ref=ghcr.io/laminas/laminas-continuous-integration-action:build-cache,mode=max

0 commit comments

Comments
 (0)