forked from mjambon/ocaml-layer
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.yml
125 lines (115 loc) · 2.69 KB
/
config.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#
# Rebuild and publish our base Docker images for OCaml once a week.
#
version: 2.1
executors:
amd64:
machine:
image: ubuntu-2204:2022.07.1
resource_class: large
arm64:
machine:
image: ubuntu-2204:2022.07.1
resource_class: arm.large
jobs:
push-multi-arch:
machine:
image: ubuntu-2204:2022.07.1
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Login
command: ./.circleci/docker-login
- run:
name: Create and push a multi-arch image manifest
command: make push-multi-arch
build-and-push:
parameters:
architecture:
type: executor
executor: << parameters.architecture >>
steps:
- checkout
- run:
name: Build
command: make build
- run:
name: Tag images with arch
command: make suffix-with-arch
- persist_to_workspace:
root: .
paths:
- images-*
- run:
name: Login
command: ./.circleci/docker-login
- run:
name: Push
command: make push
build-only:
parameters:
architecture:
type: executor
executor: << parameters.architecture >>
steps:
- checkout
- run:
name: Build
command: make build
workflows:
version: 2
build-on-pr:
jobs:
- build-only:
matrix:
parameters:
architecture: [amd64, arm64]
filters:
branches:
ignore:
- master
build-and-push-on-master-push:
jobs:
- build-and-push:
matrix:
parameters:
architecture: [amd64, arm64]
filters:
branches:
only:
- master
- push-multi-arch:
requires: [build-and-push]
filters:
branches:
only:
- master
build-and-push-weekly:
# Rebuild periodically rather than based on git changes.
triggers:
- schedule:
# Run at 07:00 every Thursday, UTC.
cron: "0 07 * * 4"
filters:
branches:
only:
- master
jobs:
- build-and-push:
matrix:
parameters:
architecture: [amd64, arm64]
# Run only on these branches (each pushing different images)
filters:
branches:
only:
- master
- push-multi-arch:
requires: [build-and-push]
# Run only on these branches (each pushing different images)
filters:
branches:
only:
- master