Skip to content

Commit 0dad3c1

Browse files
committed
add condition, push only from main
Signed-off-by: Jonathan Gonzalez V <[email protected]>
1 parent 99d559c commit 0dad3c1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/bake.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ jobs:
126126
# using skopeo. Then we sign the production images too.
127127
copytoproduction:
128128
name: Copy images to production
129-
if: github.event.inputs.environment == 'production' || github.event_name == 'schedule'
129+
if: |
130+
github.ref == 'refs/heads/main' &&
131+
( github.event.inputs.environment == 'production' || github.event_name == 'schedule' )
130132
runs-on: ubuntu-latest
131133
needs:
132134
- testbuild
@@ -182,4 +184,4 @@ jobs:
182184
'
183185
)
184186
echo "Signing ${images}"
185-
cosign sign --yes ${images}
187+
cosign sign --yes ${images}

0 commit comments

Comments
 (0)