Combining job outputs with masking leads to empty output
See original GitHub issueDescribe the bug
When combining job outputs with masking the output is empty when used in another job.
To Reproduce Steps to reproduce the behavior:
name: Repro
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
secret: ${{ steps.setup-secret.outputs.secret }}
steps:
- name: Setup secret
id: setup-secret
shell: pwsh
run: |
$secret = "SuperSecret"
echo "::add-mask::$secret"
echo "::set-output name=secret::$secret"
build:
name: Build
runs-on: ubuntu-latest
needs: setup
steps:
- name: Run tests
shell: pwsh
env:
SomeEnv: ${{ needs.prepare.outputs.secret}}
run: echo ${{ needs.prepare.outputs.secret}}
Expected behavior
Secret should be available, not empty and masked
Runner Version and Platform
Version of your runner? Current runner version: ‘2.284.0’
OS of the machine running the runner? Linux
What’s not working?
Please include error messages and screenshots.
Job Log Output
Run echo
echo
shell: /usr/bin/pwsh -command ". '{0}'"
env:
SomeEnv:
cmdlet Write-Output at command pipeline position 1
Supply values for the following parameters:
InputObject:
Write-Output: /home/runner/work/_temp/a307241a-4c46-4240-9ab0-e317d0006971.ps1:2
Line |
2 | echo
| ~~~~
| Cannot process command because of one or more missing
| mandatory parameters: InputObject.
Error: Process completed with exit code 1.
Runner and Worker’s Diagnostic Logs
If applicable, add relevant diagnostic log information. Logs are located in the runner’s _diag
folder. The runner logs are prefixed with Runner_
and the worker logs are prefixed with Worker_
. Each job run correlates to a worker log. All sensitive information should already be masked out, but please double-check before pasting here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:9 (4 by maintainers)
Top Results From Across the Web
cloudposse/github-action-secret-outputs: Allow to pass a ...
Combining job outputs with masking leads to empty output - When combining job outputs with masking the output is empty when used in...
Read more >GitHub Actions Set Output - Assure Parallel Job Access is ...
Currently, there is no easy way to reference all outputs of matrix jobs. Moreover combining it into a single output.
Read more >$P O Job - Purge a job's output
The job was cancelled (flushed) and is no longer eligible to run. JCLerror: Specify jobs which did not execute due to a JCL...
Read more >What is Data Masking? Techniques, Types and Best ...
Encrypted data can be decrypted and returned to its original state with the correct encryption key. With masked data, there is no algorithm...
Read more >Preparing Manufacturing Data with Output Jobs in ...
Multiple outputs can be streamed into a single output file if required ... Output Job files, when added to a project, appear in...
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 FreeTop 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
Top GitHub Comments
Suffering the same aws troubles, I found this thread. Later, I found the answer. Returning here to post what I found:
see
with: mask-aws-account-id: 'false'
in the amazon-ecr-login action https://github.com/aws-actions/amazon-ecr-loginHere we go https://github.com/github/feedback/discussions/13082