-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 1.07 KB
/
release_to_prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions
name: Release to Prod
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to release'
type: environment
required: true
jobs:
release-to-prod:
name: Release to prod
runs-on: ubuntu-latest
environment:
name: ${{ inputs.environment }}
steps:
- name: Log into Azure CLI
uses: azure/[email protected]
with:
creds: ${{ secrets.CREDS }}
- name: Declare environment
run: |
echo "Environment: ${{ inputs.environment }}"
- name: Set web app url
run: |
echo "Setting web app url to ${{ secrets.WEBAPP_URL }}"
echo "WEBAPP_URL=${{ secrets.WEBAPP_URL }}" >> $GITHUB_ENV
- name: Swap slots
run: az webapp deployment slot swap -s staging -n ${{ secrets.WEBAPP_NAME }} -g ${{ secrets.RESOURCE_GROUP }}