-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (66 loc) · 1.88 KB
/
tests.yml
File metadata and controls
77 lines (66 loc) · 1.88 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
env:
# https://github.com/jonpugh/github-runner/settings/secrets/actions/JONPUGH_GITHUB_TOKEN_ADMIN
GITHUB_TOKEN: "${{ secrets.JONPUGH_GITHUB_TOKEN_ADMIN }}"
RUNNER_CONFIG_NAME: "jonpugh@github-runner.${{ github.run_id }}"
jobs:
create:
name: Create Runner
# Testing github hosted.
# runs-on: jonpugh/github-runner
runs-on: ubuntu-latest
env:
# Set unique name for each item in the matrix.
RUNNER_CONFIG_NAME: "jonpugh@github-runner.${{ github.run_id }}.${{ matrix.runner }}"
# Add consistent label for all runners.
RUNNER_CONFIG_LABELS: "jonpugh@github-runner.${{ github.run_id }}"
strategy:
matrix:
runner: [1,2,3]
steps:
- uses: actions/checkout@v4
- name: Debug
run: |
echo "Who am I: $(whoami)@$(hostname -f)"
echo "Where am I: $(pwd)"
echo "Env:"
env | grep GITHUB
- name: Help
run: |
echo "Hi from .github/workflows/tests.yml!"
./github-runner-starter --help
- name: Run
run: |
./github-runner-starter \
--run \
--name=${RUNNER_CONFIG_NAME} \
--config-sh-options=--ephemeral
- name: Run again
run: |
./github-runner-starter \
--run \
--name=${RUNNER_CONFIG_NAME} \
--config-sh-options=--ephemeral
run:
name: Run Tasks
runs-on: "jonpugh@github-runner.${{ github.run_id }}"
strategy:
matrix:
runner: [1,2,3,4,5,6]
steps:
- uses: actions/checkout@v4
- name: Debug
run: |
echo "Who am I: $(whoami)"
echo "Hostname: $(hostname -f)"
echo "Environment:"
env
- name: A second task
run: |
echo "Confirmed."