Adding for search engines:
Run google-github-actions/auth@v2
Created credentials file at "/home/runner/_work/xxxxxx/xxxxx/gha-creds-12345678.json"
Error: google-github-actions/auth failed with: failed to generate Google Cloud OAuth 2.0 Access Token for [email protected]: failed to call https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/xxxxxxxxxxxx.iam.gserviceaccount.com:generateAccessToken: HTTP 404: [no body]
This was because I had specified an incorrect service account email:
- name: authenticate to GCP with with workload identity
uses: google-github-actions/auth@v2
with:
workload_identity_provider: 'projects/1234567/locations/global/workloadIdentityPools/xxxxxxxxx/providers/xxxxxxxxxxx'
service_account: '[email protected]' # this was incorrect