Skip to content

ttd2089/secret-file-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Secret File Action

Write a secret to a local file during a workflow.

Inputs

secret

Required The secret to write to a file.

b64-decode

Required Indicates whether to base64 decode the secret value. Default true.

Outputs

file

The file the secret was written to.

Example usage

steps:

  - name: GPG Key Secret File
    uses: ttd2089/[email protected]
    id: gpg-key-secret
    with:
      secret: ${{ secrets.GPG_KEY }}
      b64-decode: true

  - name: Import GPG Key
    env:
      GPG_KEY_FILE: ${{ steps.gpg-key-secret.outputs.file }}
    run: gpg --batch --import $GPG_KEY_FILE

About

Write a secret to a local file during a workflow

Resources

License

Stars

Watchers

Forks

Packages

No packages published