Skip to content

.github/workflows/aks_start.yaml #103

.github/workflows/aks_start.yaml

.github/workflows/aks_start.yaml #103

Workflow file for this run

name: AKS start cron job
on:
schedule:
- cron: "0 8 * * 1-5" # Run every weekday at 08:00
jobs:
aks_start:
name: "Start AKS"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
id: checkout_repo
uses: actions/checkout@v4
- name: Login to Azure
id: login_to_azure
run: |
az login \
--service-principal \
-u ${{ secrets.AZURE_SERVICE_PRINCIPAL_APP_ID }} \
-p ${{ secrets.AZURE_SERVICE_PRINCIPAL_SECRET }} \
--tenant ${{ secrets.AZURE_TENANT_ID }}
- name: Start AKS
id: start_aks
run: |
az aks start \
--subscription ${{ secrets.AZURE_SUBSCRIPTION_ID }} \
--resource-group "rg${{ secrets.PROJECT }}main${{ secrets.INSTANCE }}" \
--name "aks${{ secrets.PROJECT }}main${{ secrets.INSTANCE }}" \
--no-wait
- name: Logout of Azure
id: logout_from_azure
if: always()
run: |
az logout