-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadvanced.yml
More file actions
63 lines (55 loc) · 1.84 KB
/
Copy pathadvanced.yml
File metadata and controls
63 lines (55 loc) · 1.84 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
name: Lambda MicroVM runner
on:
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
start-runner:
runs-on: ubuntu-latest
outputs:
label: ${{ steps.start.outputs.label }}
microvm-id: ${{ steps.start.outputs.microvm-id }}
region: ${{ steps.start.outputs.region }}
steps:
- uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ vars.MICROVM_LAUNCH_ROLE_ARN }}
aws-region: ${{ vars.MICROVM_AWS_REGION }}
- uses: actions/create-github-app-token@v3
id: app-token
with:
app-id: ${{ vars.RUNNER_APP_ID }}
private-key: ${{ secrets.RUNNER_APP_PRIVATE_KEY }}
- uses: neebs12/lambda-microvm-github-runner@v1
id: start
with:
mode: start
github-token: ${{ steps.app-token.outputs.token }}
image-id: ${{ vars.MICROVM_RUNNER_IMAGE_ARN }}
image-version: ${{ vars.MICROVM_RUNNER_IMAGE_VERSION }}
execution-role-arn: ${{ vars.MICROVM_EXECUTION_ROLE_ARN }}
cloudwatch-log-group: ${{ vars.MICROVM_RUNTIME_LOG_GROUP }}
max-lifetime-seconds: "3600"
job:
needs: start-runner
runs-on: ${{ needs.start-runner.outputs.label }}
steps:
- uses: actions/checkout@v6
- run: uname -a
- run: docker info
- run: docker buildx version
- run: docker compose version
stop-runner:
if: ${{ always() }}
needs: [start-runner, job]
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ vars.MICROVM_LAUNCH_ROLE_ARN }}
aws-region: ${{ needs.start-runner.outputs.region }}
- uses: neebs12/lambda-microvm-github-runner@v1
with:
mode: stop
microvm-id: ${{ needs.start-runner.outputs.microvm-id }}