-
Notifications
You must be signed in to change notification settings - Fork 7
83 lines (75 loc) · 1.71 KB
/
build-test-release.yml
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
78
79
80
81
82
83
name: Build Test Release
run-name: ${{ inputs.image_id }}
on:
workflow_call:
inputs:
# e.g. ubuntu22-full-x64
image_id:
required: true
type: string
outputs:
ami_name:
description: "The name of the built AMI"
value: ${{ jobs.build.outputs.ami_name }}
ami_id:
description: "The ID of the built AMI"
value: ${{ jobs.build.outputs.ami_id }}
jobs:
build:
uses: ./.github/workflows/build.yml
with:
image_id: ${{ inputs.image_id }}
secrets: inherit
test1:
needs:
- build
uses: ./.github/workflows/test.yml
with:
ami_id: ${{ needs.build.outputs.ami_id }}
index: 1
test2:
needs:
- build
- test1
uses: ./.github/workflows/test.yml
with:
ami_id: ${{ needs.build.outputs.ami_id }}
index: 2
test-extras1:
needs:
- build
- test2
uses: ./.github/workflows/test.yml
with:
ami_id: ${{ needs.build.outputs.ami_id }}
index: 3
extras: "s3cache"
test-extras2:
needs:
- build
- test-extras1
uses: ./.github/workflows/test.yml
with:
ami_id: ${{ needs.build.outputs.ami_id }}
index: 4
extras: "s3cache"
test-gpu:
if: contains(inputs.image_id, 'gpu-x64')
needs:
- build
- test-extras2
uses: ./.github/workflows/test.yml
with:
ami_id: ${{ needs.build.outputs.ami_id }}
index: 5
instance_family: "g4dn"
release:
if: ${{ !failure() && !cancelled() }}
needs:
- build
- test-gpu
uses: ./.github/workflows/release.yml
secrets: inherit
with:
image_id: ${{ inputs.image_id }}
ami_name: ${{ needs.build.outputs.ami_name }}