-
Notifications
You must be signed in to change notification settings - Fork 7
151 lines (143 loc) · 3.82 KB
/
Copy pathdocker-matrix.yml
File metadata and controls
151 lines (143 loc) · 3.82 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
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
name: 'Build docker images'
on:
push:
branches:
- master
tags:
- '*.*.*'
- 'v*.*.*'
- '*.*.*-*'
- 'v*.*.*-*'
paths:
- 'dockers/**'
- 'Makefile'
pull_request:
paths:
- 'dockers/**'
- 'Makefile'
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
arch:
- platform: linux/amd64
runner: ubuntu-latest
suffix: amd64
- platform: linux/arm64/v8
runner: ubuntu-24.04-arm
suffix: arm64
image_target:
- image: base
target: build_base
- image: dart
target: build_dart
- image: docker
target: build_docker
- image: env
target: build_env
- image: gcloud
target: build_gcloud
- image: go
target: build_go
- image: kube
target: build_k8s
- image: nim
target: build_nim
- image: rust
target: build_rust
runs-on: ${{ matrix.arch.runner }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Build and Push Docker Image
uses: ./.github/actions/docker-build
with:
target: ${{ matrix.image_target.target }}
docker_user: ${{ secrets.DOCKERHUB_USER || 'kpango' }}
docker_pass: ${{ secrets.DOCKERHUB_PASS }}
github_token: ${{ secrets.GITHUB_TOKEN }}
docker_push: true
platform: ${{ matrix.arch.platform }}
suffix: ${{ matrix.arch.suffix }}
merge:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image_target:
- image: base
target: merge_base
- image: dart
target: merge_dart
- image: docker
target: merge_docker
- image: env
target: merge_env
- image: gcloud
target: merge_gcloud
- image: go
target: merge_go
- image: kube
target: merge_k8s
- image: nim
target: merge_nim
- image: rust
target: merge_rust
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Merge and Push Manifest
uses: ./.github/actions/docker-build
with:
target: ${{ matrix.image_target.target }}
docker_user: ${{ secrets.DOCKERHUB_USER || 'kpango' }}
docker_pass: ${{ secrets.DOCKERHUB_PASS }}
github_token: ${{ secrets.GITHUB_TOKEN }}
docker_push: true
build_dev:
needs: merge
strategy:
fail-fast: false
matrix:
arch:
- platform: linux/amd64
runner: ubuntu-latest
suffix: amd64
- platform: linux/arm64/v8
runner: ubuntu-24.04-arm
suffix: arm64
runs-on: ${{ matrix.arch.runner }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Build and Push Docker Image
uses: ./.github/actions/docker-build
with:
target: prod_build
docker_user: ${{ secrets.DOCKERHUB_USER || 'kpango' }}
docker_pass: ${{ secrets.DOCKERHUB_PASS }}
github_token: ${{ secrets.GITHUB_TOKEN }}
docker_push: true
platform: ${{ matrix.arch.platform }}
suffix: ${{ matrix.arch.suffix }}
merge_dev:
needs: build_dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Merge and Push Manifest
uses: ./.github/actions/docker-build
with:
target: merge_dev
docker_user: ${{ secrets.DOCKERHUB_USER || 'kpango' }}
docker_pass: ${{ secrets.DOCKERHUB_PASS }}
github_token: ${{ secrets.GITHUB_TOKEN }}
docker_push: true