-
Notifications
You must be signed in to change notification settings - Fork 26
42 lines (38 loc) · 1.1 KB
/
build-on-hosted-runner.yaml
File metadata and controls
42 lines (38 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: build-on-hosted-runner
on:
workflow_run:
workflows:
- build-img-ghrunner-test
types:
- completed
jobs:
hosted_runner_provision:
if: |
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'pull_request'
uses: ./.github/workflows/provision-hosted-runner.yaml
with:
runner_repo: "https://github.com/${{github.repository}}"
operating_system: windows
secrets: inherit
test_run_selfhosted_runner:
runs-on: [self-hosted, x64, Windows]
needs: hosted_runner_provision
steps:
- name: Code checkout
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.25"
- name: Test
run: go test -v ./...
destroy_hosted_runner:
needs:
- test_run_selfhosted_runner
- hosted_runner_provision
if: always() && !contains(needs.*.result, 'skipped') && !contains(needs.*.result, 'cancelled')
uses: ./.github/workflows/destroy-hosted-runner.yaml
with:
operating_system: windows
secrets: inherit