-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update container build to only push on merges #717
Conversation
927aac6
to
ac4a765
Compare
3f20368
to
90e88f7
Compare
.github/workflows/build.yaml
Outdated
@@ -60,5 +68,6 @@ jobs: | |||
uses: docker/build-push-action@v4 | |||
with: | |||
context: ./${{ matrix.directory }} | |||
push: ${{ env.PUSH_IMAGE }} | |||
push: ${{ github.event_name == 'push' && true || false }} | |||
# push: ${{ fromJSON(steps.eval_push.outputs.PUSH_IMAGE) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented code
@@ -60,5 +68,6 @@ jobs: | |||
uses: docker/build-push-action@v4 | |||
with: | |||
context: ./${{ matrix.directory }} | |||
push: ${{ env.PUSH_IMAGE }} | |||
push: ${{ github.event_name == 'push' && true || false }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this just be ${{ github.event_name == 'push' }}?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That did not work, which is why I used the fromJSON originally (actions/runner#1483). But Aaron's suggestion works.
Signed-off-by: Aaron Crawfis <[email protected]>
Enable PR from forks: