Update vault-testcase.yaml #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Vault Testcase | |
on: | |
push: | |
branches: | |
- "**" | |
jobs: | |
read-repo-secret: | |
permissions: | |
contents: read | |
id-token: write | |
name: Vault Test | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: "Read Secrets from Vault" | |
uses: hashicorp/[email protected] | |
id: secrets | |
with: | |
method: jwt | |
url: ${{ vars.VAULT_ADDR }} | |
path: ${{ github.repository_owner }} | |
role: ${{ github.event.repository.name }} | |
secrets: | | |
secret/data/github-actions/test status | PROOF_OF_CONCEPT | |
- name: Write Secrets to STDOUT | |
run: | | |
echo BEGIN | |
echo 'secret is: ${{ steps.secrets.outputs.PROOF_OF_CONCEPT }}' | |
echo END | |
action-test: | |
permissions: | |
contents: read | |
id-token: write # this is important, it's how we authenticate with Vault | |
name: Action Test | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: rancher-eio/read-vault-secrets@main | |
id: vault | |
with: | |
address: ${{ vars.VAULT_ADDR }} | |
secrets: | | |
secret/data/github-actions/test status | PROOF_OF_CONCEPT | |
- run: | | |
test "${{ env.PROOF_OF_CONCEPT }}" = "success" |