FirebaseExtended / action-hosting-deploy

Automatically deploy shareable previews for your Firebase Hosting sites
https://firebase.google.com/docs/hosting/github-integration
Apache License 2.0
695 stars 202 forks source link

Add permission documentation for GITHUB_TOKEN #389

Open actuallymentor opened 2 weeks ago

actuallymentor commented 2 weeks ago

When following the docs verbatim, Github Actions fail with a 403 error since the default setting of the GITHUB_TOKEN is read-only.

Example log for googlability:

RequestError [HttpError]: Resource not accessible by integration
    at /home/runner/work/_actions/FirebaseExtended/action-hosting-deploy/v0/bin/action.min.js:84764:27
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async createCheck (/home/runner/work/_actions/FirebaseExtended/action-hosting-deploy/v0/bin/action.min.js:87337:17)
    at async run (/home/runner/work/_actions/FirebaseExtended/action-hosting-deploy/v0/bin/action.min.js:93186:14) ***
  status: 403,
  response: ***
    url: 'https://api.github.com/repos/actuallymentor/couchcaster.app/check-runs',
    status: 403,
    headers: '...',
    data: ***
      message: 'Resource not accessible by integration',
      documentation_url: 'https://docs.github.com/rest/checks/runs#create-a-check-run',
      status: '403'
    ***
  ***,
  request: ***
    method: 'POST',
    url: '...',
    headers: ***
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'octokit-core.js/3.6.0 Node.js/20.13.1 (linux; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    ***,
    body: '...'
google-cla[bot] commented 2 weeks ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

actuallymentor commented 2 weeks ago

Signed the CLA just now. Not sure how to retrigger the check.