cloudposse / cloudposse/github-action-secret-outputs
How may I share a secret between two steps?
- Dominant language
- Shell
- Stars
- 29
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
I am using a single job. A `step1` will generate a _secret_ and a `step2` will consume this _secret_. I came across this action and thought in using it to accomplish that. Here is an exmaple of what I have tried:
```yml
- name: Encodes JWT
uses: cloudposse/github-action-secret-outputs@main
id: store-jwt
with:
secret: D955E283528E128AFDBE10E439168691754EB101
op: encode
in: ${{ env.MY_JWT }}
- name: Decodes JWT
uses: cloudposse/github-action-secret-outputs@main
id: get-jwt
with:
secret: D955E283528E128AFDBE10E439168691754EB101
op: decode
in: ${{ steps.store-jwt.outputs.out }}
...
- name: Consume secret through API
uses: fake/do-api-stuff
with:
token: steps.get-jwt.outputs.out
```
Getting an error though, so cannot validate if this works:

Any help is welcome. Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.