[GH-ISSUE #664] Issue: Composite action does not have feature parity for env list #430

Closed
opened 2026-03-01 21:43:17 +03:00 by kerem · 3 comments
Owner

Originally created by @hellwolf on GitHub (May 5, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/664

Act version

$ act --version
act version 0.2.21-9-gf56b21f

Expected behaviour

For a composite action, variables in the env list should be properly evaluated, as in the actual github workflows.

Actual behaviour

Those env variables are not evaluated and substituted.

Workflow and/or repository

Log
name: 'DevHost rsync'
description: 'Perform a rsync of a file or a folder to the DevHost.'
inputs:
  hostname:
    description: 'Hostname of the DevHost server.'
    required: true
  user:
    description: 'User of the DevHost server.'
    required: true
  ssh_key:
    description: 'SSH key for the user of the DevHost server.'
    required: true
  local_path:
    description: 'Local path of the file or folder to sync.'
    required: true
  remote_path:
    description: 'Remote path of the file or folder to sync.'
    required: true
  download:
    description: 'Perform download instead of upload.'
    required: false
outputs:
  time: # id of output
    description: 'The time we greeted you'
runs:
  using: 'composite'
  steps:
    - run: ${{ github.action_path }}/action.sh
      shell: bash
      env:
        INPUT_DEV_HOST_HOSTNAME: ${{ inputs.hostname }}
        INPUT_DEV_HOST_USER: ${{ inputs.user }}
        INPUT_DEV_HOST_SSH_KEY: ${{ inputs.ssh_key }}
        INPUT_LOCAL_PATH: ${{ inputs.local_path }}
        INPUT_REMOTE_PATH: ${{ inputs.remote_path }}
        INPUT_DOWNLOAD: ${{ inputs.download }}

act output

Log
[CI Master/Test rsync action] ⭐  Run Test rsync action locally
| + SSH_OPTS='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
| + rsync -Pav -e 'ssh -i ssh.key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' '${{' inputs.local_path '}}' '${{' inputs.user '}}@${{' inputs.hostname '}}:${{' inputs.remote_path '}}'
| Unexpected remote arg: }}:${{
| rsync error: syntax or usage error (code 1) at main.c(1372) [sender=3.1.3]
[CI Master/Test rsync action]   ❌  Failure - Test rsync action locally
Error: exit with `FAILURE`: 1

Originally created by @hellwolf on GitHub (May 5, 2021). Original GitHub issue: https://github.com/nektos/act/issues/664 ## Act version ```none $ act --version act version 0.2.21-9-gf56b21f ``` ## Expected behaviour For a composite action, variables in the `env` list should be properly evaluated, as in the actual github workflows. ## Actual behaviour Those env variables are not evaluated and substituted. ## Workflow and/or repository <details> <summary>Log</summary> ``` name: 'DevHost rsync' description: 'Perform a rsync of a file or a folder to the DevHost.' inputs: hostname: description: 'Hostname of the DevHost server.' required: true user: description: 'User of the DevHost server.' required: true ssh_key: description: 'SSH key for the user of the DevHost server.' required: true local_path: description: 'Local path of the file or folder to sync.' required: true remote_path: description: 'Remote path of the file or folder to sync.' required: true download: description: 'Perform download instead of upload.' required: false outputs: time: # id of output description: 'The time we greeted you' runs: using: 'composite' steps: - run: ${{ github.action_path }}/action.sh shell: bash env: INPUT_DEV_HOST_HOSTNAME: ${{ inputs.hostname }} INPUT_DEV_HOST_USER: ${{ inputs.user }} INPUT_DEV_HOST_SSH_KEY: ${{ inputs.ssh_key }} INPUT_LOCAL_PATH: ${{ inputs.local_path }} INPUT_REMOTE_PATH: ${{ inputs.remote_path }} INPUT_DOWNLOAD: ${{ inputs.download }} ``` </details> ## `act` output <details> <summary>Log</summary> ```none [CI Master/Test rsync action] ⭐ Run Test rsync action locally | + SSH_OPTS='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' | + rsync -Pav -e 'ssh -i ssh.key -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' '${{' inputs.local_path '}}' '${{' inputs.user '}}@${{' inputs.hostname '}}:${{' inputs.remote_path '}}' | Unexpected remote arg: }}:${{ | rsync error: syntax or usage error (code 1) at main.c(1372) [sender=3.1.3] [CI Master/Test rsync action] ❌ Failure - Test rsync action locally Error: exit with `FAILURE`: 1 ``` </details>
Author
Owner

@hellwolf commented on GitHub (May 5, 2021):

follow on #607

<!-- gh-comment-id:832486183 --> @hellwolf commented on GitHub (May 5, 2021): follow on #607
Author
Owner

@github-actions[bot] commented on GitHub (Jun 5, 2021):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:855152176 --> @github-actions[bot] commented on GitHub (Jun 5, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@chevdor commented on GitHub (Jun 5, 2021):

@hellwolf since there has been a new release since you opened the issue, I think it would be useful to test again.

<!-- gh-comment-id:855233637 --> @chevdor commented on GitHub (Jun 5, 2021): @hellwolf since there has been a new release since you opened the issue, I think it would be useful to test again.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#430
No description provided.