Skip to content

Swap Dev to Pro

Swap Dev to Pro #4

Workflow file for this run

name: Swap Dev to Pro
env:
AZURE_FUNCTIONAPP_NAME: 'drhelius-demo-func'
on:
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
swap:
runs-on: ubuntu-latest
environment: production
steps:
- name: Log into Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Swap slots
uses: azure/CLI@v1
with:
inlineScript: |
az functionapp deployment slot swap -g functions -n ${{ env.AZURE_FUNCTIONAPP_NAME }} --slot dev \
--target-slot production