more changes #12
Workflow file for this run
This file contains hidden or 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
| name: Package Helm Chart | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| helm: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| name: Package Helm Chart | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Google Auth | |
| id: auth | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| token_format: 'access_token' | |
| workload_identity_provider: '${{ secrets.WIF_PROVIDER_ID }}' | |
| service_account: '${{ secrets.SERVICE_ACCOUNT_EMAIL }}' | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Docker Auth | |
| id: docker-auth | |
| uses: 'docker/login-action@v3' | |
| with: | |
| username: 'oauth2accesstoken' | |
| password: '${{ steps.auth.outputs.access_token }}' | |
| registry: 'us-central1-docker.pkg.dev' | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v4.3.0 | |
| with: | |
| version: v3.19.0 | |
| - name: Modify Default Docker Image Tags in values.yaml | |
| id: yaml-action | |
| uses: teunmooij/yaml@v1 | |
| with: | |
| from-file: 'helm/values.yaml' | |
| to-file: 'helm/values.yaml' | |
| merge: | | |
| { "backend.image.tag": "backend-${{ github.ref_name }}", "dashboard.image.tag": "frontend-${{ github.ref_name }}" } | |
| - name: Add details to pkg.yaml file | |
| run: | | |
| echo "version: ${{ github.ref_name }}" >> helm/artifacthub-pkg.yaml | |
| echo "createdAt: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> helm/artifacthub-pkg.yaml | |
| cp README.md helm/README.md | |
| - name: Fetch dependencies for helm chart | |
| run: helm dependency update ./helm | |
| - name: Package Helm Chart | |
| run: helm package ./helm --version "${{ github.ref_name }}" --app-version "${{ github.ref_name }}" | |
| - name: Publish Helm Chart to Artifact Registry | |
| run: helm push transparency-${{ github.ref_name }}.tgz oci://us-central1-docker.pkg.dev/${{secrets.GCP_PROJECT}}/transparency-dashboard | |