Skip to content

Disable maintenance

Disable maintenance #5

name: Disable maintenance
on:
workflow_dispatch:
inputs:
environment:
required: true
type: choice
options:
- staging
- production
jobs:
disable-maintenance:
name: Disable maintenance app
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Set ARM and kubelogin environment
uses: DFE-Digital/github-actions/set-kubelogin-environment@master
with:
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}
- name: Disable maintenance app
run: make ${{ inputs.environment }} disable-maintenance
- name: Maintenance Summary
if: success()
run: |
NOW=$(TZ=Europe/London date +"%F %R")
echo 'MAINTENANCE PAGE DISABLED!' >> $GITHUB_STEP_SUMMARY
echo 'ENV: ${{ inputs.environment }}' >> $GITHUB_STEP_SUMMARY
echo "AT : ${NOW}" >> $GITHUB_STEP_SUMMARY