Skip to content

Commit

Permalink
Skip some steps if not on master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenlj committed Aug 29, 2023
1 parent 712aced commit 3936d24
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ jobs:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # ratchet:actions/checkout@v3
- id: 'auth'
name: 'Authenticate to Google Cloud'
if: github.ref == 'refs/heads/master'
uses: 'google-github-actions/auth@35b0e87d162680511bf346c299f71c9c5c379033' # ratchet:google-github-actions/[email protected]
with:
workload_identity_provider: ${{ secrets.NAIS_IO_WORKLOAD_IDENTITY_PROVIDER }}
Expand All @@ -125,6 +126,7 @@ jobs:
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@e30db14379863a8c79331b04a9969f4c1e225e0b' # ratchet:google-github-actions/setup-gcloud@v1
- name: 'Log in to Google Artifact Registry'
if: github.ref == 'refs/heads/master'
run: |-
echo '${{ steps.auth.outputs.access_token }}' | docker login -u oauth2accesstoken --password-stdin https://${{ env.GOOGLE_REGISTRY }}
- uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # ratchet:azure/setup-helm@v3
Expand All @@ -143,6 +145,7 @@ jobs:
helm package "$chart"
done
- name: Push Chart
if: github.ref == 'refs/heads/master'
run: |-
for chart in *.tgz; do
helm push "$chart" oci://${{ env.GOOGLE_REGISTRY }}/nais-io/nais/feature
Expand Down

0 comments on commit 3936d24

Please sign in to comment.