Skip to content

Commit

Permalink
update azure-app-service-settings.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tsubakimoto authored May 6, 2024
1 parent fcd4d4f commit 604d604
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/azure-app-service-settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,10 @@ jobs:
runs-on: ubuntu-latest
environment: Production
steps:
- name: Dump context
run: echo "${{ toJSON(github) }}"
- name: Set current datetime as env variable
env:
TZ: 'Asia/Tokyo'
run: |
CURRENT_DATETIME=$(date +'%Y-%m-%d_%H:%M:%S')
SETTINGS=$(echo "${{ vars.AZURE_WEBAPP_APP_SETTINGS }}" | sed "s/{0}/$CURRENT_DATETIME/")
echo "SETTINGS='$SETTINGS'" >> $GITHUB_ENV
run: echo "CURRENT_DATETIME=$(date +'%Y-%m-%d_%H:%M:%S')" >> $GITHUB_ENV
- name: Az CLI Login
uses: azure/login@v2
with:
Expand All @@ -33,7 +28,7 @@ jobs:
with:
app-name: ${{ vars.AZURE_WEBAPP_NAME }}
slot-name: 'Production'
app-settings-json: "${{ env.SETTINGS }}"
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

0 comments on commit 604d604

Please sign in to comment.