Skip to content

Commit

Permalink
Add exportToken to Vault action
Browse files Browse the repository at this point in the history
  • Loading branch information
baksetercx committed Jan 2, 2025
1 parent 669c2c8 commit 9986a07
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions vault/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ inputs:
required: true
environment:
description: 'Environment is used to find correct Vault instance.'
required: true
default: 'dev'
secrets:
description: 'Secrets to fetch from Vault; see [here](https://github.com/hashicorp/vault-action?tab=readme-ov-file#multiple-secrets) for syntax.'
required: true
exportToken:
description: |
Whether to export the Vault token as an environment variable. Set this to true if you need to be authenticated to Vault in subsequent steps.
default: 'false'

runs:
using: 'composite'
Expand All @@ -37,12 +39,14 @@ runs:
role: 'jwt-github-${{ inputs.system }}-${{ env.REPO_SHORT_NAME }}'
method: 'jwt'
path: 'jwt-github'
exportToken: ${{ inputs.exportToken }}
secrets: |
${{ inputs.secrets }}
- name: Show message on failure
if: failure()
shell: bash
run: |
# Show message on failure
echo "To access Vault, this repository must be added to https://github.com/3lvia/github-repositories-terraform/tree/trunk/systems"
exit 1

0 comments on commit 9986a07

Please sign in to comment.