简体   繁体   中英

GitHub Actions fail (You must have permission iam.serviceAccounts.ActAs) to deploy Firebase Functions (w9jds/firebase-action@master)

GitHub actions yaml:

name: Deploy to Firebase Functions on merge
"on":
  push:
    branches:
      - main
env:
  CI: false

jobs:
  build_and_deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: "Install yarn packages"
        run: yarn
        working-directory: "functions"
      - name: "Deploy to Firebase"
        uses: w9jds/firebase-action@master
        with:
          args: deploy --only functions
        env:
          FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

When pushing to main and viewing this action, I got this weird error:

Error: Missing permissions required for functions deploy. You must have permission iam.serviceAccounts.ActAs on service account argus-750f6@appspot.gserviceaccount.com.


To address this error, ask a project Owner to assign your account the "Service Account User" role from this URL: https://console.cloud.google.com/iam-admin/iam?project=argus-750f6

I have enabled that role (I made a custom role for just Service Account User) on argus-750f6@appspot.gserviceaccount.com . I even made argus-750f6@appspot.gserviceaccount.com owner, but that didn't work. I'm at a loss. Any suggestions?

You can check this guide on how to Simple guide to start GitHub Actions to Firebase Functions .

According to the error the service account doesn't have the correct permission role. The service account in the logs is the default service account of App Engine, make sure the default role of this service account is editor. It seems you changed the role of this default service account, that's why it cause an error to your deployment.

Then if you are using Firebase Token, you can proceed to the step 14 in order to generate your token that you will also use, and then proceed to the step 15 to store the token you got.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM