mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-10-20 19:52:06 +00:00
When using a reusable workflow such as: ```yaml name: "use-inputs-impl" on: workflow_call: inputs: image: description: "Image to be used in job" type: string required: false default: "docker.io/alpine:3.22" condition: description: "Only run a job if this is true" type: string required: false default: false jobs: works: runs-on: docker container: image: alpine:3.22 env: INPUT_IMAGE: ${{ inputs.image }} INPUT_CONDITION: ${{ inputs.condition }} steps: - run: echo "Hello world from Alpine" - run: cat /etc/alpine-release - run: echo "INPUT_IMAGE=$INPUT_IMAGE" - run: echo "INPUT_CONDITION=$INPUT_CONDITION" ``` The runner will currently output un-evaluated expressions: ``` INPUT_IMAGE=${{ inputs.image }} INPUT_CONDITION=${{ inputs.condition }} ``` Internally, the workflow is using `INPUT_...` environment variables to transfer data into local reusable workflows, and the order of evaluation in `getEvaluatorInputs` was preferring to use the un-evaluated value, over the evaluated value. <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - bug fixes - [PR](https://code.forgejo.org/forgejo/runner/pulls/1080): <!--number 1080 --><!--line 0 --><!--description Zml4OiBhbGxvdyBtYXBwaW5nIGludG8gZW52IHZhcmlhYmxlIElOUFVUX04gZnJvbSAke3sgaW5wdXRzLm4gfX0=-->fix: allow mapping into env variable INPUT_N from ${{ inputs.n }}<!--description--> <!--end release-notes-assistant--> Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1080 Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org> Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net> Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net> |
||
---|---|---|
.. | ||
hashfiles | ||
mocks | ||
res | ||
testdata | ||
action.go | ||
action_cache.go | ||
action_cache_offline_mode.go | ||
action_cache_test.go | ||
action_composite.go | ||
action_test.go | ||
command.go | ||
command_test.go | ||
container_mock_test.go | ||
expression.go | ||
expression_test.go | ||
job_executor.go | ||
job_executor_test.go | ||
local_repository_cache.go | ||
logger.go | ||
logger_test.go | ||
lxc-helpers-lib.sh | ||
lxc-helpers.sh | ||
reusable_workflow.go | ||
run_context.go | ||
run_context_test.go | ||
runner.go | ||
runner_test.go | ||
step.go | ||
step_action_local.go | ||
step_action_local_test.go | ||
step_action_remote.go | ||
step_action_remote_test.go | ||
step_docker.go | ||
step_docker_test.go | ||
step_factory.go | ||
step_factory_test.go | ||
step_run.go | ||
step_run_test.go | ||
step_test.go |