Skip to content

Commit 6ce0978

Browse files
heliocastrosschuberth
authored andcommitted
fix(docker): No build or publish in pull_request events
Signed-off-by: Helio Chissini de Castro <heliocastro@gmail.com>
1 parent cec3ec7 commit 6ce0978

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/docker-ort.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ on:
2727
- 'Dockerfile'
2828
- '.github/workflows/docker-ort.yml'
2929
push:
30+
branches:
31+
- 'main'
3032
tags:
3133
- '*'
3234

@@ -331,7 +333,7 @@ jobs:
331333
with:
332334
context: .
333335
target: minimal
334-
push: true
336+
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
335337
load: false
336338
build-args: |
337339
NODEJS_VERSION=${{ env.NODEJS_VERSION }}
@@ -397,7 +399,7 @@ jobs:
397399
with:
398400
context: .
399401
target: run
400-
push: true
402+
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
401403
load: false
402404
tags: |
403405
${{ steps.meta-ort.outputs.tags }}

0 commit comments

Comments
 (0)