[GH-ISSUE #255] steps.<step id>.outputs fails when step referenced has dash (-) in name (0.2.8) #177

Closed
opened 2026-03-01 21:40:55 +03:00 by kerem · 1 comment
Owner

Originally created by @svenhuster on GitHub (May 23, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/255

Hey there,

Great tool.

Found a little snag with a workaround:

When using dash in the step-id the output from this step cannot be accessed in a later step.
This seems to work in GitHub

Changing the dash to an underscore resolves the issue.

act version 0.2.8

DarwinMacBook-Air.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64

[Docker/buggy] 🚀  Start image=nektos/act-environments-ubuntu:18.04
[Docker/buggy]   🐳  docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Docker/buggy] ⭐  Run Login to Amazon ECR
[Docker/buggy]   ☁  git clone 'https://github.com/aws-actions/amazon-ecr-login' # ref=v1
[Docker/buggy]   🐳  docker cp src=/Users/svenhuster/.cache/act/aws-actions-amazon-ecr-login@v1 dst=/actions/
[Docker/buggy]   ⚙  ::set-output:: registry=OBFUSCATED.dkr.ecr.eu-west-2.amazonaws.com
[Docker/buggy]   ✅  Success - Login to Amazon ECR
[Docker/buggy] ⭐  Run Logout of Amazon ECR
ERRO[0002] Unable to interpolate string 'docker logout ${{ steps.login-ecr.outputs.registry }}' - [ReferenceError: 'ecr' is not defined]
| Not logged in to https://index.docker.io/v1/
[Docker/buggy]   ✅  Success - Logout of Amazon ECR
%
%
% act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 --secret-file .secrets-act -j good
[Docker/good] 🚀  Start image=nektos/act-environments-ubuntu:18.04
[Docker/good]   🐳  docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Docker/good] ⭐  Run Login to Amazon ECR
[Docker/good]   ☁  git clone 'https://github.com/aws-actions/amazon-ecr-login' # ref=v1
[Docker/good]   🐳  docker cp src=/Users/svenhuster/.cache/act/aws-actions-amazon-ecr-login@v1 dst=/actions/
[Docker/good]   ⚙  ::set-output:: registry=OBFUSCATED.dkr.ecr.eu-west-2.amazonaws.com
[Docker/good]   ✅  Success - Login to Amazon ECR
[Docker/good] ⭐  Run Logout of Amazon ECR
| Removing login credentials for OBFUSCATED.dkr.ecr.eu-west-2.amazonaws.com
[Docker/good]   ✅  Success - Logout of Amazon ECR
%```


[buggy.txt](https://github.com/nektos/act/files/4671429/buggy.txt)
[good.txt](https://github.com/nektos/act/files/4671430/good.txt)

Originally created by @svenhuster on GitHub (May 23, 2020). Original GitHub issue: https://github.com/nektos/act/issues/255 Hey there, Great tool. Found a little snag with a workaround: When using dash in the step-id the output from this step cannot be accessed in a later step. This seems to work in GitHub Changing the dash to an underscore resolves the issue. `act version 0.2.8` `DarwinMacBook-Air.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64 ` ```% act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 --secret-file .secrets-act -j buggy [Docker/buggy] 🚀 Start image=nektos/act-environments-ubuntu:18.04 [Docker/buggy] 🐳 docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Docker/buggy] ⭐ Run Login to Amazon ECR [Docker/buggy] ☁ git clone 'https://github.com/aws-actions/amazon-ecr-login' # ref=v1 [Docker/buggy] 🐳 docker cp src=/Users/svenhuster/.cache/act/aws-actions-amazon-ecr-login@v1 dst=/actions/ [Docker/buggy] ⚙ ::set-output:: registry=OBFUSCATED.dkr.ecr.eu-west-2.amazonaws.com [Docker/buggy] ✅ Success - Login to Amazon ECR [Docker/buggy] ⭐ Run Logout of Amazon ECR ERRO[0002] Unable to interpolate string 'docker logout ${{ steps.login-ecr.outputs.registry }}' - [ReferenceError: 'ecr' is not defined] | Not logged in to https://index.docker.io/v1/ [Docker/buggy] ✅ Success - Logout of Amazon ECR % % % act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 --secret-file .secrets-act -j good [Docker/good] 🚀 Start image=nektos/act-environments-ubuntu:18.04 [Docker/good] 🐳 docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Docker/good] ⭐ Run Login to Amazon ECR [Docker/good] ☁ git clone 'https://github.com/aws-actions/amazon-ecr-login' # ref=v1 [Docker/good] 🐳 docker cp src=/Users/svenhuster/.cache/act/aws-actions-amazon-ecr-login@v1 dst=/actions/ [Docker/good] ⚙ ::set-output:: registry=OBFUSCATED.dkr.ecr.eu-west-2.amazonaws.com [Docker/good] ✅ Success - Login to Amazon ECR [Docker/good] ⭐ Run Logout of Amazon ECR | Removing login credentials for OBFUSCATED.dkr.ecr.eu-west-2.amazonaws.com [Docker/good] ✅ Success - Logout of Amazon ECR %``` [buggy.txt](https://github.com/nektos/act/files/4671429/buggy.txt) [good.txt](https://github.com/nektos/act/files/4671430/good.txt)
kerem 2026-03-01 21:40:55 +03:00
Author
Owner

@cplee commented on GitHub (May 26, 2020):

duplicates #104

<!-- gh-comment-id:634104664 --> @cplee commented on GitHub (May 26, 2020): duplicates #104
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#177
No description provided.