-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (38 loc) · 1.26 KB
/
rbac-publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Publish rbac helm chart
env:
CHART_NAME: rbac
GAR_LOCATION: us-central1
PROJECT_NAME: cloudkite-public
PROJECT_ID: 297731695546
REPOSITORY: public-helm-charts
on:
workflow_dispatch:
push:
branches: [main]
paths: [rbac/**]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v0
with:
workload_identity_provider: projects/${{ env.PROJECT_ID }}/locations/global/workloadIdentityPools/github-actions/providers/github-oidc
service_account: github-actions@${{ env.PROJECT_NAME }}.iam.gserviceaccount.com
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- name: Docker configuration
run: gcloud auth configure-docker $GAR_LOCATION-docker.pkg.dev --quiet
- name: Update dependencies
working-directory: ${{ env.CHART_NAME }}
run: helm dependency update
- name: Package chart
run: helm package $CHART_NAME
- name: Push chart
run: helm push $CHART_NAME-*.tgz oci://$GAR_LOCATION-docker.pkg.dev/$PROJECT_NAME/$REPOSITORY