Skip to content

Commit

Permalink
chore: leverage vault secrets in helm release
Browse files Browse the repository at this point in the history
  • Loading branch information
marcsanmi committed Oct 16, 2024
1 parent bf3de86 commit 4dca52d
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/test-vault.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Secure Test Vault Secrets Retrieval

on:
pull_request:

# These permissions are needed to assume roles from Github's OIDC.
permissions:
contents: read
id-token: write

jobs:
test-get-secrets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- id: get-secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@main
with:
repo_secrets: |
APP_ID=secret/ci/repo/grafana/helm-charts/github-app:app-id
APP_PRIVATE_KEY=secret/ci/repo/grafana/helm-charts/github-app:private-key
- name: Check Secrets (Safely)
run: |
if [ -n "$APP_ID" ]; then
echo "app id is set and not empty"
else
echo "app id is not set or is empty"
exit 1
fi
if [ -n "$APP_PRIVATE_KEY" ]; then
echo "private key is set and not empty"
else
echo "private key is not set or is empty"
exit 1
fi
echo "Secrets retrieved successfully"

0 comments on commit 4dca52d

Please sign in to comment.