cloudposse / cloudposse/github-action-secret-outputs

How may I share a secret between two steps?

Open
#29 1 comment 0 reactions 0 assignees View on GitHub
bug
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:
![image](https://github.com/user-attachments/assets/966ce713-e569-40b0-a445-355f67a6685a)

Any help is welcome. Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.