Closed mbarbero closed 3 weeks ago
the change LGTM. Something that I learned the hard way is that input variables are not accessible anywhere inside a workflow file as crazy as that sounds (see https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#context-availability to get a list of places where each context is available).
So inputs should be available at jobs.
While looking at change, I also see that this can be further shortened. Instead of github.event.inputs
you could use inputs
directly afaict.
EDIT: looking at the referenced documentation, they must have made some changes, I am 100% sure that you could not use inputs in the top-level env element.
Was following https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable, but if you say that inputs
are treated differently, then let's just abandon this change.
thing seem to have changed, now inputs seem to be available everywhere it seems, so its good.
thing seem to have changed, now inputs seem to be available everywhere it seems, so its good.
gotcha, I understood the opposite 🤦
While I don't see any issue in current code, it's better practice to place the expression in environment variable before the start of the script.