Passing in secrets to reusable workflow does not work without secrets in env
Problem
We are trying out Github Actions and have run into a curious issue which we think is a bug. We have configured secrets at the organization level, and are trying to pass those secrets in to a reusable workflow as shown below: [code block] This does not work. `password` shows up blank in the reusable workflow instead of having the value of the secret. If we instead add `env: ${{ secrets }}` to the top-level of the manifest, all of a sudden the secret gets passed in to the workflow. This seems quite counterintuitive since passing in secrets should not be related to the env, and this behavior does not appear to be documented anywhere. In fact, this example of secrets in reusable workflows does not need an `env` key set at the top-level.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Passing in secrets to reusable workflow does not work without secrets in env
Spent hours on this dreaded issue. CircleCI is so much better when it comes to re-usability. Github Actions lack good documentation and features!
Trust Score
7 verifications
- 1
Spent hours on this dreaded issue. CircleCI is so much better when it comes to r
Spent hours on this dreaded issue. CircleCI is so much better when it comes to re-usability. Github Actions lack good documentation and features!
Validation
Resolved in actions/runner GitHub issue #1413. Community reactions: 31 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep