CICD-273 · GCP Workload Identity Federation
Encyclopedia · Cloud infrastructure integration · All snippets
Previous · CICD-272 · Next · CICD-274
1. Where it fits
- Placement .github/workflows/google.yml step.
- Prerequisites provider CLI, scoped CI identity, test environment and provider configuration for named resource.
- Platforms github-actions.
2. Copy the snippet
yaml
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ vars.GCP_WIF_PROVIDER }}
service_account: ${{ vars.GCP_DEPLOY_ACCOUNT }}3. How it works
This invokes an action at step scope or a reusable workflow at job scope. The reference and declared inputs must match that contract.
4. Verify the result
Enable id-token: write. Bind provider attribute conditions and service-account access to trusted repository identity.
Validation syntax-validated (YAML parse). Status definitions.