Skip to content

Update rootfs cache #234

Update rootfs cache

Update rootfs cache #234

name: Update rootfs cache
concurrency: azure-vm
on:
workflow_dispatch:
schedule:
# Daily at 04:44 UTC
- cron: '44 4 * * *'
pull_request:
paths:
# We run it when changing one if its dependencies
- .github/workflows/update-rootfs-cache.yaml
- .github/actions/download-rootfs.yaml
env:
az_name: wsl-ci
az_resource_group: wsl
jobs:
vm-start:
runs-on: ubuntu-latest
steps:
- name: Log into azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_VM_CREDS }}
- name: Start the Runner
shell: bash
run: |
az vm start --name ${{ env.az_name }} --resource-group ${{ env.az_resource_group }}
update-cache:
needs: vm-start
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download rootfs
uses: ./.github/actions/download-rootfs
with:
distros: Ubuntu-Preview
path: C:\Users\${{ secrets.AZURE_VM_UN }}\Downloads\rootfs
stop-vm:
runs-on: ubuntu-latest
needs: [vm-start, update-cache]
if: always()
steps:
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_VM_CREDS }}
- name: Deallocate the Runner
shell: bash
run: |
az vm deallocate --name ${{ env.az_name }} --resource-group ${{ env.az_resource_group }}