Skip to content

docs: Update cloud-init tutorial for 24.04.1 (#500) #243

docs: Update cloud-init tutorial for 24.04.1 (#500)

docs: Update cloud-init tutorial for 24.04.1 (#500) #243

Workflow file for this run

name: Example action using WSL
concurrency: azure-vm
on:
pull_request:
paths:
# We run it when changing one if its dependencies
- .github/workflows/wsl-example.yaml
- .github/actions/**
push:
branches: [main]
workflow_dispatch:
env:
az_name: wsl-ci
az_resource_group: wsl
jobs:
vm-setup:
runs-on: ubuntu-latest
steps:
- 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 }}
run-script:
needs: vm-setup
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install or update WSL
uses: ./.github/actions/wsl-install
with:
distro: Ubuntu
- name: Checkout your repo into WSL
uses: ./.github/actions/wsl-checkout
with:
distro: Ubuntu
working-dir: "~/myrepo"
# You'll probably use this action if you program runs entirely inside WSL
- name: Run bash inside WSL
uses: ./.github/actions/wsl-bash
with:
distro: Ubuntu
working-dir: "~/myrepo"
exec: |
echo "Hello from $(lsb_release -ds)"
- name: Run powershell on Windows
shell: powershell
env:
WSL_UTF8: "1" # Recommended otherwise it's hard to read on Github
run: wsl --list --verbose
stop-vm:
runs-on: ubuntu-latest
needs: [vm-setup, run-script]
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 }}