forked from y-scope/clp
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (83 loc) · 3.11 KB
/
clp-execution-image-build.yaml
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
84
85
86
87
88
89
90
91
92
93
94
name: "clp-execution-image-build"
on:
pull_request:
paths:
- ".github/actions/clp-execution-image-build/action.yaml"
- ".github/workflows/clp-execution-image-build.yaml"
- "tools/docker-images/**/*"
push:
paths:
- ".github/actions/clp-execution-image-build/action.yaml"
- ".github/workflows/clp-execution-image-build.yaml"
- "tools/docker-images/**/*"
schedule:
# Run daily at 00:15 UTC (the 15 is to avoid periods of high load)
- cron: "15 0 * * *"
workflow_dispatch:
concurrency:
group: "${{github.workflow}}-${{github.ref}}"
# Cancel in-progress jobs for efficiency
cancel-in-progress: true
jobs:
filter-relevant-changes:
runs-on: "ubuntu-latest"
outputs:
ubuntu_focal_image_changed: "${{steps.filter.outputs.ubuntu_focal_image}}"
ubuntu_jammy_image_changed: "${{steps.filter.outputs.ubuntu_jammy_image}}"
steps:
- uses: "actions/checkout@v4"
with:
submodules: "recursive"
- name: "Work around actions/runner-images/issues/6775"
run: "chown $(id -u):$(id -g) -R ."
shell: "bash"
- name: "Filter relevant changes"
uses: "dorny/paths-filter@v3"
id: "filter"
with:
base: "main"
filters: |
ubuntu_focal_image:
- ".github/actions/clp-execution-image-build/action.yaml"
- ".github/workflows/clp-execution-image-build.yaml"
- "tools/docker-images/clp-execution-base-ubuntu-focal/**/*"
ubuntu_jammy_image:
- ".github/actions/clp-execution-image-build/action.yaml"
- ".github/workflows/clp-execution-image-build.yaml"
- "tools/docker-images/clp-execution-base-ubuntu-jammy/**/*"
ubuntu_focal_execution_image:
if: "'true' == needs.filter-relevant-changes.outputs.ubuntu_focal_image_changed"
needs: "filter-relevant-changes"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
with:
submodules: "recursive"
- name: "Workaround actions/runner-images/issues/6775"
shell: "bash"
run: "chown $(id -u):$(id -g) -R ."
- uses: "./.github/actions/clp-execution-image-build"
with:
image_registry: "ghcr.io"
image_registry_username: "${{github.actor}}"
image_registry_password: "${{secrets.GITHUB_TOKEN}}"
platform_id: "ubuntu"
platform_version_id: "focal"
ubuntu_jammy_execution_image:
if: "'true' == needs.filter-relevant-changes.outputs.ubuntu_jammy_image_changed"
needs: "filter-relevant-changes"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
with:
submodules: "recursive"
- name: "Workaround actions/runner-images/issues/6775"
shell: "bash"
run: "chown $(id -u):$(id -g) -R ."
- uses: "./.github/actions/clp-execution-image-build"
with:
image_registry: "ghcr.io"
image_registry_username: "${{github.actor}}"
image_registry_password: "${{secrets.GITHUB_TOKEN}}"
platform_id: "ubuntu"
platform_version_id: "jammy"