-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not only secrets, but anything, if masked, cannot be referenced into another job: #2316
Comments
Surprisingly, for me it passes through the ECR address between two jobs, but not a short git hash and only when using workflow_dispatch. For pull_request and push branches works perfectly fine. |
i'm experiencing the same with passing short git hashes between jobs |
Any progress on this yet? Have a very specific task that requires passing stuff between jobs. |
I was able to overcome this problem by just encoding the value, e.g. # job1
echo "string_enc=$(echo $STRING | base64 -w 0)" >> $GITHUB_OUTPUT
# job2
echo ${{ needs.job1.outputs.string_enc }} | base64 -d It took me a quite sometime of debugging because warning message was super hard to notice. |
@tx0c I think you need |
@rupertbg I don't think unmasking secrets is a solution to the problem. GitHub Actions should support passing sensitive values between jobs while still allowing them to be masked. Options like The solution for passing sensitive values between jobs seems to be using a secret store, according to these docs: However the default GitHub Actions secrets store only allows adding secrets from the web UI, and reading those secrets from workflows, so it doesn't seem possible to programmatically write a secret like a generated AWS ECR password and then use it in another job within the same workflow. The only options users have are A) potentially expose the password, or B) use a hard coded permanent password stored as a secret, as opposed to a temporary 12 hour password generated using OIDC and AWS AssumeRole (recommended). This issue has been open since 2022 though 😕 I guess option C is to use a third party secret store (like AWS Secrets Manager) for handling secrets within a workflow, but I feel that GitHub Actions should support passing data securely between jobs of the same workflow. Coupled with the fact that services containers do not support specifying the startup |
e.g. when I use amazon-ecr-login get a
registry
in outputs,https://github.com/marketplace/actions/amazon-ecr-login-action-for-github-actions
but if I define the registry into output for another job to use, the full registry string is masked like this:
in another job, use it with
jobs.job_id.outputs.registry
it got emptythis is a BUG, not only enhancement request in community/community#13082
Originally posted by @tx0c in #1498 (comment)
The text was updated successfully, but these errors were encountered: