-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (31 loc) · 1.09 KB
/
azure-app-service-settings.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
# https://github.com/marketplace/actions/azure-app-service-settings
name: Azure App Service Settings
on:
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
apply-azure-app-service-settings:
runs-on: ubuntu-latest
environment: Production
steps:
- name: Set current datetime as env variable
env:
TZ: 'Asia/Tokyo'
run: echo "CURRENT_DATETIME=$(date +'%Y-%m-%d_%H:%M:%S')" >> $GITHUB_ENV
- name: Az CLI Login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Azure App Service Settings
uses: Azure/appservice-settings@v1
with:
app-name: ${{ vars.AZURE_WEBAPP_NAME }}
slot-name: 'Production'
app-settings-json: '[{"name":"now","value":"${{ env.CURRENT_DATETIME }}","slotSetting":false}]'
general-settings-json: '${{ vars.AZURE_WEBAPP_GENERAL_SETTINGS }}'
- name: Az CLI Logout
run: az logout