fix: allow mapping into env variable INPUT_N from ${{ inputs.n }} #1080
No reviewers
Labels
No labels
FreeBSD
Kind/Breaking
Kind/Bug
Kind/Chore
Kind/DependencyUpdate
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Windows
linux-powerpc64le
linux-riscv64
linux-s390x
run-end-to-end-tests
run-forgejo-tests
run-multi-platform-tests
No milestone
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
forgejo/runner!1080
Loading…
Reference in a new issue
No description provided.
Delete branch "mfenniak/forgejo-runner:input_env-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When using a reusable workflow such as:
The runner will currently output un-evaluated expressions:
Internally, the workflow is using
INPUT_...environment variables to transfer data into local reusable workflows, and the order of evaluation ingetEvaluatorInputswas preferring to use the un-evaluated value, over the evaluated value.I can't see any reason why environment variables starting with
INPUT_*are considered to be inputs, so I'm removing this and running the full test suite to see if anything pops up. If nothing comes up, I'll add test automation covering the expected working case.This workflow looks invalid. Have you tested it how GitHub reacts? Per documentation it says thatINPUT_environment variable is created for each input. Manually creating environment variable that would overwrite whatinputsets sounds like invalid case. This workflow should work withoutenvbeing declared.GitHub seems to allow re-declaration of
INPUT_environment variables but evaluatesinputsbefore assigning them properly, so this PR would make it align with how it behaves.617be783d1fe409b162cWIP: fix: don't map env variables INPUT_... into ${{ inputs.... }}to fix: allow mapping into env variable INPUT_N from ${{ inputs.n }}@proton-ab This is a composite workflow, which if following the documentation you've linked, would fall into "... then it will not automatically get INPUT_<VARIABLE_NAME>".
I think the workflow intent is easily understood, regardless? This doesn't seem extra-ordinary to me:
Yeah, sorry for confusion. Here's related GitHub issue https://github.com/actions/runner/issues/665 that documents this method as workaround too, so we very much want to have this sorted.
Remarkably simple fix 👍
cascading-pr updated at actions/setup-forgejo#716