Repository navigation
Conversation
The deploy job gets a token for hexdocs-search through workload identity federation instead of the service account key in GCP_SA_KEY, which can then be deleted. hexpm-ops sets GCP_WORKLOAD_IDENTITY_PROVIDER and GCP_SERVICE_ACCOUNT in the staging and prod environments and binds the service account to each environment's subject.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The deploy job authenticates to Google Cloud as
hexdocs-searchthrough GitHub's OIDC token and workload identity federation, instead of the service account key in theGCP_SA_KEYenvironment secret (prod 82b890fd, staging ebbe2fee, created 2026-07-14). The job getsid-token: writeto request the token andcontents: readfor the checkout.GCP_WORKLOAD_IDENTITY_PROVIDERandGCP_SERVICE_ACCOUNTcome from thestagingandprodenvironments, which hexpm-ops manages. The hexpm-ops change bindshexdocs-search@hexpm-<env>to the subjectrepo:hexpm/hexdocs-search:environment:<env>and limits each environment to the branch of the same name, so only a push tostagingorprodcan deploy.Merging doesn't deploy; the workflow runs on pushes to
stagingandprod, and those should only get this after the hexpm-ops change is applied. Once both environments have deployed with it, hexpm-ops deletes the keys andGCP_SA_KEY.