auto-stop-status-check #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: auto-stop-status-check | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "30 19,22 * * *" # Every day at 20:30 and 23:30 BST | |
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: AKS STOP status check | |
run: ./scripts/aks/auto-shutdown-status.sh stop ${{ secrets.SHUTDOWN_NOTIFICATIONS_WEBHOOK }} | |
- name: Postgres Flexible STOP status check | |
run: ./scripts/flexible-server/flexserverstatus.sh stop ${{ secrets.SHUTDOWN_NOTIFICATIONS_WEBHOOK }} | |
- name: App Gateway STOP status check | |
run: ./scripts/appgateway/appgw_status.sh stop ${{ secrets.SHUTDOWN_NOTIFICATIONS_WEBHOOK }} | |
- name: SQL Managed Instance STOP status check | |
run: ./scripts/sqlmi/sqlmistatus.sh stop ${{ secrets.SHUTDOWN_NOTIFICATIONS_WEBHOOK }} | |
- name: SFTP STOP status check | |
run: ./scripts/blob-storage/sftp-check-status.sh stop ${{ secrets.SHUTDOWN_NOTIFICATIONS_WEBHOOK }} | |
- name: VM STOP status check | |
run: ./scripts/vm/vmstatus.sh deallocate ${{ secrets.SHUTDOWN_NOTIFICATIONS_WEBHOOK }} | |
- name: Output log file | |
run: ./scripts/common/log-output.sh | |
- name: Commit status update json files | |
continue-on-error: true | |
run: | | |
git config user.name hmcts-platform-operations | |
git config user.email [email protected] | |
git pull | |
git checkout -b testing-json-file-updates-stop | |
git add ./status | |
git commit -m "Update json files stop status updates" | |
git push --set-upstream origin testing-json-file-updates-stop |