Skip to content

Commit

Permalink
add condition, push only from main
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Gonzalez V <[email protected]>
  • Loading branch information
sxd committed Jan 23, 2025
1 parent 99d559c commit 0dad3c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/bake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ jobs:
# using skopeo. Then we sign the production images too.
copytoproduction:
name: Copy images to production
if: github.event.inputs.environment == 'production' || github.event_name == 'schedule'
if: |
github.ref == 'refs/heads/main' &&
( github.event.inputs.environment == 'production' || github.event_name == 'schedule' )
runs-on: ubuntu-latest
needs:
- testbuild
Expand Down Expand Up @@ -182,4 +184,4 @@ jobs:
'
)
echo "Signing ${images}"
cosign sign --yes ${images}
cosign sign --yes ${images}

0 comments on commit 0dad3c1

Please sign in to comment.