FirebaseExtended / FirebaseExtended/action-hosting-deploy

[BUG] Cannot use GitHub bot account for comment

Open
#91 0 comments 5 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
809
Forks
232
PR merge metrics
No merged PRs in 30d

Description

We have a bot user account for all of our CI notifications that go back to PRs. It doesn't seem we can use this account with this action, and it needs to come from the "actions-bot" instead, which is the default `GITHUB_TOKEN`.

### Action config

```yaml
- name: Preview CMS
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets._GITHUB_ACCESS_TOKEN }} # we'd like to use our own user repo token here
firebaseServiceAccount: ${{ secrets.GCP_SA_KEY_DEV }}
projectId: ${{ env.PROJECT_ID }}
target: cms
expires: 14d
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
```

### Error message

```
Run FirebaseExtended/action-hosting-deploy@v0
(node:3122) UnhandledPromiseRejectionWarning: HttpError: You must authenticate via a GitHub App.
at /home/runner/work/_actions/FirebaseExtended/action-hosting-deploy/v0/bin/action.min.js:1:29017
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:3122) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3122) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
```

### Expected behavior

We can use any repoToken that is authenticated for the repository

### Actual behavior

Action only works with `GITHUB_TOKEN`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.