Closed luisherranz closed 4 years ago
Hey @luisherranz ! Thank you for the report. Now, the action requires GitHub repo. In the future, It would be great to be able to run in a standalone mode like your example.
Include actions/checkout
at the beginning of the workflow to make it work:
steps:
- uses: actions/checkout@v1
See examples for more details: https://github.com/treosh/lighthouse-ci-action#examples
I see, thanks @alekseykulikov.
Related LHCI issue: https://github.com/GoogleChrome/lighthouse-ci/issues/151
I'm on the latest version I do have actions/checkout@v2
but I still get the error...
LHCI_BUILD_CONTEXT__CURRENT_HASH: ...
LHCI_BUILD_CONTEXT__COMMIT_MESSAGE: ....
LHCI_BUILD_CONTEXT__AUTHOR: ....
LHCI_BUILD_CONTEXT__AVATAR_URL: .....
It keeps asking me .. I'm not sure how many more it will ask.. I gave up when it asked me AVATAR_URL
Actually, I figured it out...
Looking at the log for checkout@v2
I saw this:
As I'm using a self-hosted
runner I had an old version of git.. upgrading it.. now there is indeed a .git
folder in my root directory and everything works as expected.
I'm having this error when I activate
temporaryPublicStorage: true
.This is the run: https://github.com/frontity/frontity/pull/244/checks?check_run_id=339869140
And this is the workflow job:
By looking at the specific line that throws the error: https://github.com/GoogleChrome/lighthouse-ci/blob/master/packages/utils/src/build-context.js#L54 it looks like lighthouse is trying to use
git rev-list -n1 HEAD
to get the commit hash.Just before that, it looks for some environment variables. I have solved the issue adding the env
LHCI_BUILD_CONTEXT__CURRENT_HASH
populated with${{ github.sha }}
.I'm not sure why I am having this problem, but in case you can reproduce it, maybe this package should add the
LHCI_BUILD_CONTEXT__CURRENT_HASH
env variable by default: