Skip to content

Commit

Permalink
Only push images from bitnami/minideb repository
Browse files Browse the repository at this point in the history
Make it so that only builds triggered by the `bitnami/minideb`
repository will attempt to push images (because it is the only
repository that has access to the required secrets). This will prevent
builds in forked repositories that don't have access to the secrets from
failing.

Signed-off-by: John Kristensen <john@jerrykan.com>
  • Loading branch information
jerrykan committed Jun 14, 2023
1 parent 51ac5ee commit 2501c9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
platform: "${{ matrix.arch }}"
is_latest: ${{ matrix.dist == env.LATEST }}
- name: Push
if: github.ref == 'refs/heads/master'
if: github.repository == 'bitnami/minideb' && github.ref == 'refs/heads/master'
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -71,7 +71,7 @@ jobs:
deploy_manifests:
runs-on: ubuntu-22.04
needs: [ build_multiarch ]
if: github.ref == 'refs/heads/master'
if: github.repository == 'bitnami/minideb' && github.ref == 'refs/heads/master'
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -89,7 +89,7 @@ jobs:
needs:
- build_multiarch
- deploy_manifests
if: always()
if: github.repository == 'bitnami/minideb'
name: Notify unsuccessful CI run
steps:
- name: Notify in Slack channel
Expand Down

0 comments on commit 2501c9f

Please sign in to comment.