-
Notifications
You must be signed in to change notification settings - Fork 48
208 lines (186 loc) · 6.37 KB
/
docker.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
name: docker
on:
push:
branches:
- main
tags:
- '*'
# For testing:
pull_request:
jobs:
build-and-push-server:
strategy:
matrix:
include:
- platform: linux/arm64
runner: [self-hosted, Linux, ARM64]
- platform: linux/x86_64
runner: [self-hosted, Linux, X64]
runs-on: ${{ matrix.runner }}
steps:
- name: Setup Docker on macOS
if: runner.os == 'macOS'
uses: douglascamata/setup-docker-macos-action@v1-alpha
- uses: actions/checkout@v4
- uses: ./.github/actions/docker-setup
with:
docker_username: ${{ secrets.DOCKER_CI_USERNAME }}
docker_password: ${{ secrets.DOCKER_CI_ACCESS_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN}}
- name: Metadata (rivetgg/server:full)
id: meta-full
uses: docker/metadata-action@v4
with:
images: rivetgg/rivet-server
tags: |
type=sha,prefix=full-
type=ref,event=branch,prefix=full-
type=ref,event=tag,prefix=full-
- name: Build & Push (rivetgg/server:full)
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta-full.outputs.tags }}
file: docker/server/Dockerfile
target: full
platforms: ${{ matrix.platform }}
secret-files: |
netrc=${{ runner.temp }}/netrc
- name: Metadata (rivetgg/server:slim)
id: meta-slim
uses: docker/metadata-action@v4
with:
images: rivetgg/rivet-server
tags: |
type=sha,prefix=slim-
type=ref,event=branch,prefix=slim-
type=ref,event=tag,prefix=slim-
- name: Build & Push (rivetgg/server:slim)
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta-slim.outputs.tags }}
file: docker/server/Dockerfile
target: slim
platforms: ${{ matrix.platform }}
secret-files: |
netrc=${{ runner.temp }}/netrc
build-and-push-client:
strategy:
matrix:
include:
- platform: linux/arm64
runner: [self-hosted, Linux, ARM64]
- platform: linux/x86_64
runner: [self-hosted, Linux, X64]
runs-on: ${{ matrix.runner }}
steps:
- name: Setup Docker on macOS
if: runner.os == 'macOS'
uses: douglascamata/setup-docker-macos-action@v1-alpha
- uses: actions/checkout@v4
- uses: ./.github/actions/docker-setup
with:
docker_username: ${{ secrets.DOCKER_CI_USERNAME }}
docker_password: ${{ secrets.DOCKER_CI_ACCESS_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN}}
- name: Metadata (rivetgg/client:full-runner)
id: meta-full-runner
uses: docker/metadata-action@v4
with:
images: rivetgg/rivet-client
tags: |
type=sha,prefix=full-runner-
type=ref,event=branch,prefix=full-runner-
type=ref,event=tag,prefix=full-runner-
- name: Build & Push (rivetgg/client:full-runner)
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta-full-runner.outputs.tags }}
file: docker/client/Dockerfile
target: full-runner
platforms: ${{ matrix.platform }}
secret-files: |
netrc=${{ runner.temp }}/netrc
- name: Metadata (rivetgg/client:isolate-v8-runner)
id: meta-isolate-v8-runner
uses: docker/metadata-action@v4
with:
images: rivetgg/rivet-client
tags: |
type=sha,prefix=isolate-v8-runner-
type=ref,event=branch,prefix=isolate-v8-runner-
type=ref,event=tag,prefix=isolate-v8-runner-
- name: Build & Push (rivetgg/client:isolate-v8-runner)
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta-isolate-v8-runner.outputs.tags }}
file: docker/client/Dockerfile
target: isolate-v8-runner
platforms: ${{ matrix.platform }}
secret-files: |
netrc=${{ runner.temp }}/netrc
- name: Metadata (rivetgg/client:container-runner)
id: meta-container-runner
uses: docker/metadata-action@v4
with:
images: rivetgg/rivet-client
tags: |
type=sha,prefix=container-runner-
type=ref,event=branch,prefix=container-runner-
type=ref,event=tag,prefix=container-runner-
- name: Build & Push (rivetgg/client:container-runner)
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta-container-runner.outputs.tags }}
file: docker/client/Dockerfile
target: container-runner
platforms: ${{ matrix.platform }}
secret-files: |
netrc=${{ runner.temp }}/netrc
build-and-push-monolith:
strategy:
matrix:
include:
- platform: linux/arm64
runner: [self-hosted, Linux, ARM64]
- platform: linux/x86_64
runner: [self-hosted, Linux, X64]
runs-on: ${{ matrix.runner }}
steps:
- name: Setup Docker on macOS
if: runner.os == 'macOS'
uses: douglascamata/setup-docker-macos-action@v1-alpha
- uses: actions/checkout@v4
- uses: ./.github/actions/docker-setup
with:
docker_username: ${{ secrets.DOCKER_CI_USERNAME }}
docker_password: ${{ secrets.DOCKER_CI_ACCESS_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN}}
- name: Metadata (rivetgg/rivet)
id: meta-monolith
uses: docker/metadata-action@v4
with:
images: rivetgg/rivet
tags: |
type=sha,prefix=monolith-
type=ref,event=branch,prefix=monolith-
type=ref,event=tag,prefix=monolith-
- name: Build & Push (rivetgg/rivet)
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta-monolith.outputs.tags }}
file: docker/monolith/Dockerfile
platforms: ${{ matrix.platform }}
secret-files: |
netrc=${{ runner.temp }}/netrc