Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
play

GitHub Action

export-secrets

v0.5.2

export-secrets

play

export-secrets

Export GitHub Actions secrets as environment variables

Installation

Copy and paste the following snippet into your .yml file.

              

- name: export-secrets

uses: koyashiro/[email protected]

Learn more about this action in koyashiro/export-secrets

Choose a version

export-secrets

Export GitHub Actions secrets as environment variables.

Usage

Set the JSON of secrets to secrets.

steps:
  - uses: koyashiro/[email protected]
    with:
      secrets: ${{ toJSON(secrets) }}

Downcase TF_VAR_

If you want to downcase secrets starting with TF_VAR_, you can use the downcase-tf-var option. For example, a secret like TF_VAR_EXAMPLE will be exported as TF_VAR_example.

steps:
  - uses: koyashiro/[email protected]
    with:
      secrets: ${{ toJSON(secrets) }}
      downcase-tf-var: true

Downcase TF_TOKEN_

If you want to downcase secrets starting with TF_TOKEN_, you can use the downcase-tf-token option. For example, a secret like TF_TOKEN_EXAMPLE_COM will be exported as TF_TOKEN_example_com.

steps:
  - uses: koyashiro/[email protected]
    with:
      secrets: ${{ toJSON(secrets) }}
      downcase-tf-token: true