Open kaihendry opened 4 years ago
@kaihendry I came across this issue and hunted down a fix. Lighthouse CI respects the LHCI_GITHUB_TOKEN
environment variable, so if you have a secret of the same name you can add it with:
# https://github.com/marketplace/actions/lighthouse-ci-action
name: Lighthouse Audit
on: push
jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v3
+ env:
+ LHCI_GITHUB_TOKEN: ${{ secrets.LHCI_GITHUB_TOKEN }}
What is the GitHub token used for? The readme doesn't seem to talk much about a GitHub token needed. So, given we need to assign a PAT - what's the least amount of permissions needed for this to complete successfully? Would be great to document this in the readme 👍
From what I can see, it would be the repo:status scope? According to the Lighthouse CI docs - https://github.com/GoogleChrome/lighthouse-ci/blob/master/docs/getting-started.md#alternative-personal-access-token-method
Yeah this would be nice to have in the docs
Digging into the output, it would appear No GitHub token set, skipping GitHub status check. ?
https://github.com/kaihendry/ltabus/runs/748414075
Which doesn't make sense to me, as shouldn't it be set automatically?
https://github.com/kaihendry/ltabus/blob/master/.github/workflows/main.yml