Setting the file. One moment.
Skill 32 · Managing Workflow Secrets
Subchapter 32.9
evals/files/leaky-secret.yml
YAML40 lines1 KB
name: Notify
on:
workflow_run:
workflows: ["Build and Push"]
types:
- completed
permissions: {}
jobs:
notify:
name: Send Slack notification
runs-on: ubuntu-24.04
permissions:
contents: read
id-token: write
steps:
- name: Log in to Azure
uses: bitwarden/gh-actions/azure-login@main
with:
subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
tenant_id: ${{ secrets.AZURE_TENANT_ID }}
client_id: ${{ secrets.AZURE_CLIENT_ID }}
- name: Get Azure Key Vault secrets
id: secrets
uses: bitwarden/gh-actions/get-keyvault-secrets@main
with:
keyvault: ci-shared-kv
secrets: "SLACK-WEBHOOK-URL"
- name: Log out from Azure
uses: bitwarden/gh-actions/azure-logout@main
- name: Send notification
run: |
echo "Using webhook ${{ steps.secrets.outputs.SLACK-WEBHOOK-URL }}"
echo "SLACK_WEBHOOK=${{ steps.secrets.outputs.SLACK-WEBHOOK-URL }}" >> notify.env
curl -X POST -d '{"text":"build done"}' ${{ steps.secrets.outputs.SLACK-WEBHOOK-URL }}