Skip to content

Set up Azure environment #103

Set up Azure environment

Set up Azure environment #103

Workflow file for this run

name: Set up Azure environment
on: workflow_dispatch
permissions:
id-token: write
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: production
steps:
- name: Login to azure πŸ”‘
id: login-to-azure
uses: azure/login@v1
with:
client-id: d58b2e85-2d34-4cdb-ad70-5f2b767dd8e2
tenant-id: 3aa4a235-b6e2-48d5-9195-7fcf05b459b0
allow-no-subscriptions: true
- name: Show Azure account
run: az account show
# Checkout internal repository where the bicep files are located
- name: Checkout internal πŸ›ŽοΈ
id: checkout-internal
uses: actions/checkout@v3
with:
repository: 'equinor/design-system-internal'
ref: main
token: ${{ secrets.PAT_INTERNAL }}
# Do the actual deployment
- name: deploy πŸš€
id: deploy
uses: azure/arm-deploy@v1
with:
scope: subscription
region: northeurope
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }}
template: .azure/main.bicep
parameters: 'location=northeurope'
failOnStdErr: false
- name: logout πŸ”“
run: |
az logout
if: always()
- name: log-errors-to-slack
uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()