Merge pull request #197 from gittuf/dependabot/github_actions/all-84f… #70
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: Deploy Prod | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| concurrency: | |
| group: release | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| - id: setup-gcloud | |
| uses: google-github-actions/auth@v3 | |
| with: | |
| workload_identity_provider: "projects/216981959795/locations/global/workloadIdentityPools/github-idpool/providers/github-provider" | |
| service_account: "github-ci@gittuf-451517.iam.gserviceaccount.com" | |
| - name: Setup gcloud | |
| uses: google-github-actions/setup-gcloud@v3 | |
| - uses: ko-build/setup-ko@v0.9 | |
| env: | |
| KO_DOCKER_REPO: us-docker.pkg.dev/gittuf-451517/gittuf | |
| - name: Build image | |
| env: | |
| KO_DEFAULTBASEIMAGE: "cgr.dev/chainguard/git:latest" | |
| run: | | |
| digest=$(ko build .) | |
| echo "IMAGE_DIGEST=$digest" >> "$GITHUB_ENV" | |
| - name: Deploy image | |
| run: | | |
| gcloud run deploy app \ | |
| --image "${IMAGE_DIGEST}" \ | |
| --region us-central1 \ | |
| --allow-unauthenticated \ | |
| --service-account gittuf-app@gittuf-451517.iam.gserviceaccount.com \ | |
| --project gittuf-451517 \ | |
| --update-env-vars=APP_EMAIL_ID="179610826+gittuf-app-test[bot]@users.noreply.github.com",KMS_KEY="projects/gittuf-451517/locations/global/keyRings/gittuf-github-app/cryptoKeys/gittuf-github-webhook-key/cryptoKeyVersions/7",GET_USER_SIGNATURE="false",GITHUB_APP_ID="980634",CLOUD_PROVIDER="gcp",GITHUB_WEBHOOK_SECRET="projects/216981959795/secrets/github-webhook-secret/versions/1",APP_SIGNING_KEY="projects/216981959795/secrets/gittuf-app-signing-key/versions/1",APP_SIGNING_PUBKEY="projects/216981959795/secrets/gittuf-app-signing-pubkey/versions/1",GITTUF_DEV="1" \ | |
| --memory 1Gi |