mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-27 19:35:32 +00:00
22.04 is the default today:
23da668261/README.md
Being more specific will avoid unexpected errors when Github updates the
default.
Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
32 lines
951 B
YAML
32 lines
951 B
YAML
name: Cleanup dangling Azure resources
|
|
on:
|
|
schedule:
|
|
- cron: "0 0 * * *"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
cleanup-resources:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Log into Azure
|
|
env:
|
|
AZ_APPID: ${{ secrets.AZ_APPID }}
|
|
AZ_PASSWORD: ${{ secrets.AZ_PASSWORD }}
|
|
AZ_TENANT_ID: ${{ secrets.AZ_TENANT_ID }}
|
|
AZ_SUBSCRIPTION_ID: ${{ secrets.AZ_SUBSCRIPTION_ID }}
|
|
run: bash tests/integration/kubernetes/gha-run.sh login-azure
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
pip3 install --user --upgrade \
|
|
azure-identity==1.16.0 \
|
|
azure-mgmt-resource==23.0.1
|
|
|
|
- name: Cleanup resources
|
|
env:
|
|
AZ_SUBSCRIPTION_ID: ${{ secrets.AZ_SUBSCRIPTION_ID }}
|
|
CLEANUP_AFTER_HOURS: 24 # Clean up resources created more than this many hours ago.
|
|
run: python3 tests/cleanup_resources.py
|