Skip to content

Commit 7707bc7

Browse files
Push and release only on merge to main branch
1 parent b570dcf commit 7707bc7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/actions/build-container-image/action.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ runs:
6363
id: build-and-push
6464
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
6565
with:
66-
push: ${{ github.event.pull_request.merged == true }}
66+
push: ${{ github.event_name == 'push' }}
6767
context: .
6868
platforms: linux/${{ inputs.arch }}
6969
file: Dockerfile.${{ inputs.arch }}

.github/workflows/main.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
token: ${{ secrets.GITHUB_TOKEN }}
4848

4949
push-container-image:
50-
if: github.event.pull_request.merged == true
50+
if: github.event_name == 'push'
5151
runs-on: ubuntu-latest
5252
needs: build-container-image
5353
steps:
@@ -114,7 +114,7 @@ jobs:
114114
uses: actions/download-artifact@v2
115115

116116
- name: Upload artifacts to build results
117-
if: github.event.pull_request.merged == true
117+
if: github.event_name == 'push'
118118
uses: marvinpinto/action-automatic-releases@latest
119119
with:
120120
repo_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)