Authenticate with workload federation credential file instead of service account key
See original GitHub issueThe use case you’re trying to solve
I would like to use a federated credential file from the auth action to configure the firebase deploy
Change to the action that would solve that use case
- id: auth
name: Authenticate to Google Cloud
uses: google-github-actions/auth@v0.3.1
with:
create_credentials_file: true
workload_identity_provider: ...
service_account: ${{ secrets.SERVICE_ACCOUNT_EMAIL }}
- name: 🚀 Firebase Deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
credentials_file_path: ${{ steps.auth.output.credentials_file_path }}
projectId: '${{ secrets.PROJECT_ID }}'
channelId: live
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:15
Top Results From Across the Web
Enable keyless access to GCP with workload Identity Federation
With workload Identity federation, you can securely operate your workloads and no longer have to worry about managing service account keys.
Read more >Authenticate to Google Cloud · Actions · GitHub Marketplace
Workload Identity Federation is recommended over Service Account Keys as it obviates the need to export a long-lived credential and establishes a trust ......
Read more >Keyless authentication to Google Cloud Platform using ...
Workload Identity Federation enables applications running outside the Google Cloud to replace long lived Service account keys with temporary ...
Read more >Workload Identity Federation with Google Cloud - Datatonic
It does not need an external key since, due to Workload Identity Federation, we won't be using external authentication to activate it. You...
Read more >Use gcloud with credentials from identity federation with OIDC ...
However, it's not clear how to authenticate the gcloud SDK itself. Normally, using a service account key, one would run gcloud auth activate-service-account...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi!
I was stuck in this problem. IDK if this concerns you: ⛔ Issue : I manually created the firebaseServiceAccount token using
$ firebase login:ci
and save it in github actions secrets and it didn’t work. ✅ Solution : I ran$ firebase init hosting:github
and in one of the steps it did automatically upload a new token to github actions secrets. And now it’s working fine.Cheers
You can use the following snippet to use
google-github-actions/auth
-generated credential file withaction-hosting-deploy
: