Closed orta closed 4 years ago
I gave the first option a go in https://github.com/treosh/lighthouse-ci-action/pull/6
Note to future viewers: this will only work if your workflow is set to run on pull_request
.
It would be nice if it could also run on push
and get the PR number if any PR is associated to the branch.
If you need to run on push, a workaround could be to run a workflow on both push
and pull_request
but only run the Lighthouse job if we are on a PR.
@robinmetral env variables interpolation works for all types of events. Check a dedicated workflow recipe for more details. This example using PR specific variables, but it can be any env variable or secret.
Thanks for making this extra example @alekseykulikov!
What I meant is that the GitHub environment variable github.events.pull_request.number
, is only available on pull_request
.
There's nothing this Action can really do about it, I was just mentioning it because it took me a while to understand why it was undefined in my push
workflow 🙂
Hi there!
Cool work, I'm trying to audit my PR deploys, but they include a URL which differs per run.
I thought I'd reach out if you had any ideas?
Current (not working):
Some options:
straight up copy the shell style $THING replacement (which would mean looking through all env vars and seeing if they can be replaced in strings)
explicitly add a template variable replacement syntax (faster, & more explicit)