1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-10-20 19:52:06 +00:00
forgejo-runner/act/runner
Mathieu Fenniak 02247b852a fix: allow mapping into env variable INPUT_N from ${{ inputs.n }} (#1080)
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>
2025-10-10 21:55:08 +00:00
..
hashfiles [RDNF #11] fix: skipped jobs have no result & fix: favor command-line over files & chore: fix some comments (#143) 2025-06-09 10:25:43 +00:00
mocks fix: send job outputs & job result to Forgejo in sync with each other (#995) 2025-09-14 20:02:43 +00:00
res Add super-linter + fix lint issues (#650) 2021-05-03 09:52:03 -07:00
testdata fix: allow mapping into env variable INPUT_N from ${{ inputs.n }} (#1080) 2025-10-10 21:55:08 +00:00
action.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
action_cache.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
action_cache_offline_mode.go feat: offline mode for new action cache (#2173) 2025-04-12 14:03:12 +00:00
action_cache_test.go test: prevent data race detection in TestActionCache (#858) 2025-08-15 09:00:50 +00:00
action_composite.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
action_test.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
command.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
command_test.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
container_mock_test.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
expression.go fix: allow mapping into env variable INPUT_N from ${{ inputs.n }} (#1080) 2025-10-10 21:55:08 +00:00
expression_test.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
job_executor.go fix: send job outputs & job result to Forgejo in sync with each other (#995) 2025-09-14 20:02:43 +00:00
job_executor_test.go fix: send job outputs & job result to Forgejo in sync with each other (#995) 2025-09-14 20:02:43 +00:00
local_repository_cache.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
logger.go fix: a composite action must not change the result of the calling step before it completes (#1019) 2025-09-20 16:30:19 +00:00
logger_test.go fix: a composite action must not change the result of the calling step before it completes (#1019) 2025-09-20 16:30:19 +00:00
lxc-helpers-lib.sh fix: make the creation of LXC templates atomic so they cannot be interrupted while building (#1049) 2025-10-03 09:09:29 +00:00
lxc-helpers.sh feat: add support for a trixie based Debian GNU/Linux backend (e.g. trixie-lxc:lxc://debian:trixie) (#997) 2025-09-15 07:26:56 +00:00
reusable_workflow.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
run_context.go chore(cleanup): lxc-helpers does not need a global lock (#1047) 2025-10-03 16:15:43 +00:00
run_context_test.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
runner.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
runner_test.go fix: allow mapping into env variable INPUT_N from ${{ inputs.n }} (#1080) 2025-10-10 21:55:08 +00:00
step.go fix: improve logging to diagnose mystery job terminations (#1048) 2025-10-02 22:43:50 +00:00
step_action_local.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
step_action_local_test.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
step_action_remote.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
step_action_remote_test.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
step_docker.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
step_docker_test.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
step_factory.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
step_factory_test.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
step_run.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
step_run_test.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00
step_test.go chore: bump version to v11 (#940) 2025-09-05 07:29:38 +00:00