Skip to content

aks-auto-shutdown

aks-auto-shutdown #928

name: aks-auto-shutdown
on:
workflow_dispatch:
schedule:
- cron: "0 20,23 * * *" # Every day at 20:00 and 23:00 BST
env:
DEV_ENV: ${{ secrets.DEV_ENV }}
permissions:
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: "Az CLI login"
uses: azure/login@v2
with:
client-id: 2b6fa9d7-7dba-4600-a58a-5e25554997aa # DTS AKS Auto-Shutdown
tenant-id: 531ff96d-0ae9-462a-8d2d-bec7c0b42082 # HMCTS.NET
allow-no-subscriptions: true
- name: Staging - AKS Auto Stop
run: ./scripts/aks/auto-start-stop.sh stop staging
env:
DEV_ENV: ${{ env.DEV_ENV }}
- name: Test - AKS Auto Stop
run: ./scripts/aks/auto-start-stop.sh stop testing
env:
DEV_ENV: ${{ env.DEV_ENV }}
- name: Demo - AKS Auto Stop
run: ./scripts/aks/auto-start-stop.sh stop demo
env:
DEV_ENV: ${{ env.DEV_ENV }}
- name: Development - AKS Auto Stop
run: ./scripts/aks/auto-start-stop.sh stop development
env:
DEV_ENV: ${{ env.DEV_ENV }}
- name: Sandbox - AKS Auto Stop
run: ./scripts/aks/auto-start-stop.sh stop sandbox
env:
DEV_ENV: ${{ env.DEV_ENV }}
- name: ITHC - AKS Auto Stop
run: ./scripts/aks/auto-start-stop.sh stop ithc
env:
DEV_ENV: ${{ env.DEV_ENV }}
#Production is referenced here to include the PTL clusters, these are the only production clusters that will be impacted.
- name: PROD - AKS Auto Stop
run: ./scripts/aks/auto-start-stop.sh stop production
env:
DEV_ENV: ${{ env.DEV_ENV }}
- name: Untagged - AKS Auto Stop
run: ./scripts/aks/auto-start-stop.sh stop untagged
env:
DEV_ENV: ${{ env.DEV_ENV }}
- name: Output log file
run: ./scripts/common/log-output.sh