Environment Variables not passed through
See original GitHub issueDescribe the bug
Environment variables set on the workflow step (via the env keyword) are not passed through to the command when the workflow runs.
From my workflow:
- name: Destroy Infrastructure
id: retry_on_error
uses: nick-fields/retry@v2
env:
ENVIRONMENT: dev
NODE_OPTIONS: '--max_old_space_size=7168'
with:
timeout_minutes: 60
max_attempts: 3
retry_wait_seconds: 60
retry_on: error
command: npx nx destroy ${{matrix.project}} --stage=${{ steps.git-branch.outputs.name }}
Expected behavior
Environment Variables set on the workflow step are used when invoking the command, which is the standard behaviour for the default run action, that this is meant to be a drop-in replacement for.
Screenshots N/A
Logs I can gather logs if necessary, but I feel like this is part feature request part bug report, so I’m not sure how useful logs would be.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Environment variables not passed other jobs with ... - GitLab
As opposed to documentation, environment variables are not passed to other jobs when explicit dependencies are in place. Steps to reproduce.
Read more >Environment variables not passed to program
I'm on macOS, and I use skhd as my hotkey daemon. It's basically a program that lets me assign keyboard shortcuts to shell...
Read more >Docker-compose not passing environment variables to docker ...
Compose supports declaring default environment variables in an environment file named .env placed in the folder where the docker-compose ...
Read more >Environment variables are not accessible in bash script
Variables are not passed to child shells by default, only if they are exported. Think of each bash session as independent (they largely...
Read more >Docker run: Passthrough environment variables do not get ...
Problem description Passthrough environment variables do not get passed through; the documentation says they do.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I had to explicitly make my reference
nick-fields/retry@v2.8.0, but it looks like that did the trick! Thanks for looking into this so quickly, and I’m glad my research was helpful! ❤️Just published v2.8.0 that I think should resolve this. Thanks for your issue and research!
Can you confirm whether this resolves your issue?