Skip to content

How to generate, mask, and output a token from one job in a workflow to the next #29880

Answered by philip-gai
jnahmias asked this question in Actions
Discussion options

You must be logged in to vote

This isn't something currently supported 😞

https://github.com/orgs/community/discussions/13082 is a similar discussion and has an example workaround of encrypting and later decrypting the secrets instead of masking.

You could also temporarily save the password as a repository secret, use it in the next job and then clean it up. Here's an example of doing that. Unfortunately it requires using a personal access token (PAT) to save the secret, so at that point you may prefer just encrypting and decrypting the secrets and not masking them at all.1

Footnotes

  1. This suggestion was made on my own, not as an employee of GitHub 🙂

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@jnahmias
Comment options

Answer selected by jnahmias
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants