This repository was archived by the owner on Jun 15, 2026. It is now read-only.
ci: migrate GCP auth to keyless Workload Identity Federation (WIF)#331
Merged
Conversation
The static GCP_CREDENTIALS service-account key (github-actions@integration-server-326115) was deleted during incident remediation, breaking the GCS release/staging uploads. Switch CI to keyless WIF (OIDC) via google-github-actions/auth@v3, mirroring the builds_server #19/#20 pattern. No static key required. - build.yaml (push-build): auth@v2 + credentials_json -> auth@v3 WIF provider + service_account; pin project on setup-gcloud@v2; add id-token/contents permissions. - release.yaml / staging.yaml: grant id-token: write (+ contents: write) on the calling job; stop passing the now-deleted credentials_json secret. - build.yaml: declare previously-undeclared `beta` input; drop unused `inputs.project_id` reference. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates the CI release/staging pipeline from a deleted static GCP service-account key (GCP_CREDENTIALS) to keyless Google Cloud authentication via GitHub OIDC + Workload Identity Federation (WIF), so the push-build job can upload artifacts to GCS and create GitHub Releases without storing long-lived credentials.
Changes:
- Updated the reusable build workflow to use
google-github-actions/auth@v3with WIF (workload_identity_provider+service_account) and pinnedproject_idforsetup-gcloud. - Granted
id-token: write/contents: writepermissions where needed (caller jobs and thepush-buildjob) to enable OIDC minting and GitHub Release creation. - Removed the
credentials_jsonsecret passthrough/declaration and declared the previously-undeclaredbetaworkflow input.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/build.yaml |
Switches GCP auth to keyless WIF, pins project_id, adds required job permissions, and updates workflow-call interface (inputs/secrets). |
.github/workflows/staging.yaml |
Adds caller job permissions and removes the unused GCP_CREDENTIALS secret passthrough. |
.github/workflows/release.yaml |
Adds caller job permissions and removes the unused GCP_CREDENTIALS secret passthrough. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The static
GCP_CREDENTIALSservice-account key (SAgithub-actions@integration-server-326115, projectintegration-server-326115/#497784144587) was deleted during weekend incident remediation, which broke the GCS upload in the release/staging pipeline (push-buildjob). This PR migrates CI to keyless Workload Identity Federation (OIDC) so no static key is needed, mirroring thebuilds_server#19/#20 pattern.Changes
build.yaml(push-buildjob):google-github-actions/auth@v2+credentials_json➜auth@v3keyless WIF (workload_identity_provider+service_account,create_credentials_file: true).setup-gcloud@v2now pinsproject_id: integration-server-326115(replacing the dropped, undeclaredinputs.project_id).permissions: { id-token: write, contents: write }(id-tokenfor OIDC,contentsforsoftprops/action-gh-release).release.yaml/staging.yaml(callers of the reusable workflow):permissions: { id-token: write, contents: write }on the calling job so the reusable workflow can mint the OIDC token.secrets.credentials_json: ${{ secrets.GCP_CREDENTIALS }}passthrough.build.yaml(workflow_call): declared the previously-undeclaredbetainput (type: boolean, defaultfalse); removed thecredentials_jsonsecret declaration.GCP infra (verified, not modified)
pieces-app/plugin_sublime➜roles/iam.workloadIdentityUserongithub-actions@integration-server-326115is already present (verified viaget-iam-policy, not recreated).projects/497784144587/locations/global/workloadIdentityPools/github-pool/providers/github-provider.app-releases-production/app-releases-stagingare in the standard allowlist (app-releases-*) — no additional bucket-scoped grant required.gcloud run deploy) ➜ no runtime SA required. No IAM writes performed.Test plan
maintriggersStaging➜ confirmpush-buildauthenticates via WIF andgsutil cptogs://app-releases-staging/...succeeds.*.*.*) triggersRelease➜ confirm WIF auth +gsutil cptogs://app-releases-production/...and GitHub Release creation succeed.Notes / follow-ups
GCP_CREDENTIALSGitHub secret is left in place (now unused); safe to delete after validation.secrets.PERSONAL_ACCESS_TOKENin thebuildjob is referenced but not declared inworkflow_call.secretsnor inherited, so it resolves empty on the version-mismatch error path.Made with Cursor