generated from making/log-sink
-
Notifications
You must be signed in to change notification settings - Fork 0
199 lines (199 loc) · 5.85 KB
/
ci.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
name: CI
on:
push:
branches:
- main
paths:
- src/**
- ui/**
- pom.xml
- .github/workflows/*
pull_request:
branches:
- main
paths:
- src/**
- ui/**
- pom.xml
- .github/workflows/*
jobs:
unit-test:
permissions:
packages: write
contents: read
uses: categolj/workflows/.github/workflows/unit-test.yaml@main
build-oci-image-jvm-amd64:
if: github.ref == 'refs/heads/main'
permissions:
packages: write
contents: read
needs: unit-test
uses: categolj/workflows/.github/workflows/build-oci-image-jvm.yaml@main
with:
image_name: jvm_amd64
image_file: jvm_amd64.yaml
runs_on: ubuntu-latest
build-oci-image-jvm-aarch64:
if: github.ref == 'refs/heads/main'
permissions:
packages: write
contents: read
needs: unit-test
uses: categolj/workflows/.github/workflows/build-oci-image-jvm.yaml@main
with:
image_name: jvm_aarch64
image_file: jvm_aarch64.yaml
runs_on: ARM64
push-multi-arch-image-jvm:
if: github.ref == 'refs/heads/main'
permissions:
packages: write
contents: read
needs:
- build-oci-image-jvm-amd64
- build-oci-image-jvm-aarch64
uses: categolj/workflows/.github/workflows/push-multi-arch-image.yaml@main
with:
prefix: jvm
save-image-jvm-amd64:
if: github.ref == 'refs/heads/main'
permissions:
packages: write
contents: write
needs: build-oci-image-jvm-amd64
uses: categolj/workflows/.github/workflows/save-images.yaml@main
with:
image_name: jvm_amd64
image_file: jvm_amd64.yaml
save-image-jvm-aarch64:
if: github.ref == 'refs/heads/main'
permissions:
packages: write
contents: write
needs: build-oci-image-jvm-aarch64
uses: categolj/workflows/.github/workflows/save-images.yaml@main
with:
image_name: jvm_aarch64
image_file: jvm_aarch64.yaml
build-oci-image-native-amd64:
if: github.ref == 'refs/heads/main'
permissions:
packages: write
contents: read
needs: unit-test
uses: categolj/workflows/.github/workflows/build-oci-image-native.yaml@main
with:
image_name: native_amd64
image_file: native_amd64.yaml
runs_on: ubuntu-latest
build-oci-image-native-aarch64:
if: github.ref == 'refs/heads/main'
permissions:
packages: write
contents: read
needs: unit-test
uses: categolj/workflows/.github/workflows/build-oci-image-native.yaml@main
with:
image_name: native_aarch64
image_file: native_aarch64.yaml
runs_on: ARM64
push-multi-arch-image-native:
if: github.ref == 'refs/heads/main'
permissions:
packages: write
contents: read
needs:
- build-oci-image-native-amd64
- build-oci-image-native-aarch64
uses: categolj/workflows/.github/workflows/push-multi-arch-image.yaml@main
with:
prefix: native
save-image-native-amd64:
if: github.ref == 'refs/heads/main'
permissions:
packages: write
contents: write
needs: build-oci-image-native-amd64
uses: categolj/workflows/.github/workflows/save-images.yaml@main
with:
image_name: native_amd64
image_file: native_amd64.yaml
save-image-native-aarch64:
if: github.ref == 'refs/heads/main'
permissions:
packages: write
contents: write
needs: build-oci-image-native-aarch64
uses: categolj/workflows/.github/workflows/save-images.yaml@main
with:
image_name: native_aarch64
image_file: native_aarch64.yaml
build-native-binaries:
if: github.ref == 'refs/heads/main'
needs: build-oci-image-native-amd64
permissions:
contents: write
uses: categolj/workflows/.github/workflows/build-native-image.yaml@main
strategy:
matrix:
with:
- runs-on: ubuntu-latest
binary_suffix: -x86_64-pc-linux
- runs-on: ARM64
binary_suffix: -aarch64-pc-linux
- runs-on: macos-13
binary_suffix: -x86_64-apple-darwin
- runs-on: macos-latest
binary_suffix: -aarch64-apple-darwin
with:
download_target: false
e2e_test: true
test_url_1: http://localhost:8080/actuator/health
runs-on: ${{ matrix.with.runs-on }}
binary_suffix: ${{ matrix.with.binary_suffix }}
deploy-to-fly:
if: github.ref == 'refs/heads/main'
needs: save-image-native-amd64
permissions:
id-token: write
contents: read
uses: ./.github/workflows/deploy-to-fly.yaml
secrets:
VAULT_ADDR: ${{ secrets.VAULT_ADDR }}
publish-native-binaries:
if: github.ref == 'refs/heads/main'
needs: build-native-binaries
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Download build artifacts x86_64-pc-linux
uses: actions/download-artifact@v4
with:
name: lognroll-x86_64-pc-linux
path: lognroll-x86_64-pc-linux
- name: Download build artifacts aarch64-pc-linux
uses: actions/download-artifact@v4
with:
name: lognroll-aarch64-pc-linux
path: lognroll-aarch64-pc-linux
- name: Download build artifacts x86_64-apple-darwin
uses: actions/download-artifact@v4
with:
name: lognroll-x86_64-apple-darwin
path: lognroll-x86_64-apple-darwin
- name: Download build artifacts aarch64-apple-darwin
uses: actions/download-artifact@v4
with:
name: lognroll-aarch64-apple-darwin
path: lognroll-aarch64-apple-darwin
- name: check files
run: find .
- uses: pyTooling/Actions/releaser@r0
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
./lognroll-x86_64-pc-linux/lognroll-x86_64-pc-linux
./lognroll-aarch64-pc-linux/lognroll-aarch64-pc-linux
./lognroll-x86_64-apple-darwin/lognroll-x86_64-apple-darwin
./lognroll-aarch64-apple-darwin/lognroll-aarch64-apple-darwin