-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip some steps if not on master branch
- Loading branch information
Showing
1 changed file
with
3 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} | ||
|
@@ -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 | ||
|
@@ -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 | ||
|