CI-CD for domains #26
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: Deploy Domains Infrastructure | |
on: | |
push: | |
workflow_dispatch: | |
permissions: | |
packages: write | |
pull-requests: write | |
jobs: | |
deploy_domains_infra: | |
name: Deploy Domains Infrastructure | |
runs-on: ubuntu-22.04 | |
concurrency: deploy_production | |
environment: | |
name: production | |
permissions: | |
id-token: write | |
steps: | |
- uses: azure/login@v2 | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
- name: Fetch secrets from key vault | |
uses: azure/CLI@v2 | |
id: keyvault-yaml-secret | |
with: | |
inlineScript: | | |
SLACK_WEBHOOK=$(az keyvault secret show --name "SLACK-WEBHOOK" --vault-name "${{ secrets.INF_KEY_VAULT }}" --query "value" -o tsv) | |
echo "::add-mask::$SLACK_WEBHOOK" | |
echo "SLACK_WEBHOOK=$SLACK_WEBHOOK" >> $GITHUB_OUTPUT | |
- name: Deploy Domains Infrastructure | |
id: deploy_domains_infra | |
uses: DFE-Digital/github-actions/deploy-domains-infra@ci-cd-domains | |
with: | |
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
azure-subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
slack-webhook: ${{ steps.keyvault-yaml-secret.outputs.SLACK_WEBHOOK }} |