Interview Prep/GitHub Actions/OIDC & Cloud Authentication

OIDC works on `main` but fails on a tag-triggered release workflow.

IntermediateTroubleshootingOIDC & Cloud Authentication
Answer

Likely causes → Trust policy only allows repo:ORG/REPO:ref:refs/heads/main; tag runs have sub repo:ORG/REPO:ref:refs/tags/v1.4.0.

Diagnose → Decode the token claims in the failing run.

Fix → Add a StringLike condition for repo:ORG/REPO:ref:refs/tags/v*, or bind the release job to an environment and trust the environment subject.

Prevent → Use environments for every privileged job so sub is predictable.

All GitHub Actions questions Roadmap: GitHub Actions

More on OIDC & Cloud Authentication