Skip to content

Commit

Permalink
ci: Auto start azure vm
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Feb 14, 2023
1 parent e83d691 commit 054aef2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ name: yode
on: push

jobs:
power_on_azure_vm:
name: Power On Azure VM
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Az CLI login
uses: azure/login@v1
with:
# Creds created following:
# https://blog.beachside.dev/entry/2021/08/27/183000
creds: '${{ secrets.AZURE_CREDENTIALS_GITHUB_ACTIONS}}'

- name: Power ON
run: az vm start --resource-group yue --name yode-ci --no-wait

build:
runs-on: ${{ matrix.os }}
continue-on-error: false
Expand Down Expand Up @@ -30,6 +46,7 @@ jobs:
uses: actions/checkout@v3

- name: CCache
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
uses: hendrikmuhs/[email protected]
with:
max-size: ${{ matrix.arch == 'arm64' && '3G' || '2G' }}
Expand Down

0 comments on commit 054aef2

Please sign in to comment.