Skip to content

Commit c8454bc

Browse files
radarherehugovk
andauthored
Skip push-valgrind job if not pushed to main (#278)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent cbd6928 commit c8454bc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ jobs:
195195
name: Push ubuntu-24.04-noble-amd64-valgrind
196196
needs: test-valgrind
197197
runs-on: ubuntu-latest
198+
if: "github.event_name == 'push'
199+
&& github.ref == 'refs/heads/main'"
198200
steps:
199201
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
200202
with:
@@ -221,9 +223,7 @@ jobs:
221223
docker images
222224
223225
- name: Push image
224-
if: "steps.build.outputs.logged_in == 'true'
225-
&& github.event_name == 'push'
226-
&& github.ref == 'refs/heads/main'"
226+
if: "steps.build.outputs.logged_in == 'true'"
227227
run: make push-ubuntu-24.04-noble-amd64-valgrind BRANCH=main
228228
env:
229229
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}

0 commit comments

Comments
 (0)