Skip to content

Enable maintenance

Enable maintenance #2

name: Enable maintenance
on:
workflow_dispatch:
inputs:
environment:
required: true
type: choice
options:
- qa
- production
jobs:
enable-maintenance:
name: Enable maintenance app
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and push docker image
id: build-image
uses: DFE-Digital/github-actions/build-docker-image@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
dockerfile-path: maintenance_page/Dockerfile
docker-repository: ghcr.io/dfe-digital/publish-maintenance
context: maintenance_page
- uses: azure/login@v2
with:
creds: ${{ secrets[format('AZURE_CREDENTIALS_{0}_AKS', github.event.inputs.environment)] }}
- name: Set ARM and kubelogin environment
uses: DFE-Digital/github-actions/set-kubelogin-environment@master
with:
azure-credentials: ${{ secrets[format('AZURE_CREDENTIALS_{0}_AKS', github.event.inputs.environment)] }}
- name: Deploy maintenance app
run: make ${{ inputs.environment }}_aks maintenance-fail-over
env:
MAINTENANCE_IMAGE_TAG: ${{steps.build-image.outputs.tag}}