Skip to content
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

How may I share a secret between two steps? #29

Open
jeanchilger opened this issue Aug 30, 2024 · 0 comments
Open

How may I share a secret between two steps? #29

jeanchilger opened this issue Aug 30, 2024 · 0 comments
Labels
bug 🐛 An issue with the system

Comments

@jeanchilger
Copy link

jeanchilger commented Aug 30, 2024

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:

      - 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

Any help is welcome. Thanks!

@jeanchilger jeanchilger added the bug 🐛 An issue with the system label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

1 participant