-
Notifications
You must be signed in to change notification settings - Fork 42
1180 lines (993 loc) · 44.8 KB
/
Copy pathrelease.yml
File metadata and controls
1180 lines (993 loc) · 44.8 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
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: Release
on:
push:
tags:
- 'v*.*.*'
env:
DOCKERHUB_BACKEND_IMAGE: tess1o/geopulse-backend
DOCKERHUB_FRONTEND_IMAGE: tess1o/geopulse-ui
GHCR_BACKEND_IMAGE: ghcr.io/tess1o/geopulse-backend
GHCR_FRONTEND_IMAGE: ghcr.io/tess1o/geopulse-ui
permissions:
contents: write
packages: write
jobs:
# If this workflow fails:
# 1. Immediately delete the tag:
# git tag -d v1.X.Y && git push origin :refs/tags/v1.X.Y
# 2. Fix the issue in main branch
# 3. Run pre-release validation workflow
# 4. Re-create tag with same version after validation passes
# Extract version from tag (remove 'v' prefix)
prepare:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- name: Get version from tag
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
# Verify pre-release validation was run for this commit
# TEMPORARILY DISABLED - needs stabilization
verify-prerelease:
if: false # Disabled temporarily
runs-on: ubuntu-latest
steps:
- name: Check pre-release validation
uses: actions/github-script@v7
with:
script: |
const { data: workflows } = await github.rest.actions.listWorkflowRunsForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'pre-release.yml',
status: 'success',
per_page: 20
});
const tagCommitSha = context.sha;
const validatedRun = workflows.workflow_runs.find(run =>
run.head_sha === tagCommitSha
);
if (!validatedRun) {
core.setFailed(
`❌ Pre-release validation not found for commit ${tagCommitSha}\n\n` +
`Required: Run pre-release workflow before creating release tag.\n\n` +
`Action required:\n` +
`1. Delete this tag: git tag -d ${context.ref.replace('refs/tags/', '')} && git push origin :${context.ref}\n` +
`2. Run pre-release validation workflow from GitHub Actions UI\n` +
`3. After validation passes, re-create tag: git tag -a ${context.ref.replace('refs/tags/', '')} -m "Release ${context.ref.replace('refs/tags/', '')}"\n` +
`4. Push tag: git push origin ${context.ref.replace('refs/tags/', '')}`
);
} else {
console.log(`✅ Pre-release validation passed on ${validatedRun.updated_at}`);
console.log(` Run ID: ${validatedRun.id}`);
console.log(` Commit: ${validatedRun.head_sha}`);
}
# Build Backend JVM AMD64
build-backend-jvm-amd64:
needs: [prepare]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Backend JVM AMD64
uses: docker/build-push-action@v5
with:
context: .
file: backend/Dockerfile
platforms: linux/amd64
push: true
build-args: |
VERSION=${{ needs.prepare.outputs.version }}-jvm
tags: |
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-jvm-amd64
${{ env.DOCKERHUB_BACKEND_IMAGE }}:jvm-latest-amd64
${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-jvm-amd64
${{ env.GHCR_BACKEND_IMAGE }}:jvm-latest-amd64
cache-from: type=gha,scope=jvm-amd64
cache-to: type=gha,mode=max,scope=jvm-amd64
# Build Backend JVM ARM64
build-backend-jvm-arm64:
needs: [prepare]
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Backend JVM ARM64
uses: docker/build-push-action@v5
with:
context: .
file: backend/Dockerfile
platforms: linux/arm64
push: true
build-args: |
VERSION=${{ needs.prepare.outputs.version }}-jvm
tags: |
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-jvm-arm64
${{ env.DOCKERHUB_BACKEND_IMAGE }}:jvm-latest-arm64
${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-jvm-arm64
${{ env.GHCR_BACKEND_IMAGE }}:jvm-latest-arm64
cache-from: type=gha,scope=jvm-arm64
cache-to: type=gha,mode=max,scope=jvm-arm64
# Build Backend Native AMD64
build-backend-native-amd64:
needs: [prepare]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Backend Native AMD64
uses: docker/build-push-action@v5
with:
context: .
file: backend/Dockerfile.native
platforms: linux/amd64
push: true
build-args: |
VERSION=${{ needs.prepare.outputs.version }}-native
QUARKUS_NATIVE_BUILD_ARGS=
tags: |
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-amd64
${{ env.DOCKERHUB_BACKEND_IMAGE }}:native-latest-amd64
${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-amd64
${{ env.GHCR_BACKEND_IMAGE }}:native-latest-amd64
cache-from: type=gha,scope=native-amd64
cache-to: type=gha,mode=max,scope=native-amd64
# Build Backend Native ARM64
build-backend-native-arm64:
needs: [prepare]
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Backend Native ARM64
uses: docker/build-push-action@v5
with:
context: .
file: backend/Dockerfile.native
platforms: linux/arm64
push: true
build-args: |
VERSION=${{ needs.prepare.outputs.version }}-native
QUARKUS_NATIVE_BUILD_ARGS=
tags: |
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-arm64
${{ env.DOCKERHUB_BACKEND_IMAGE }}:native-latest-arm64
${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-arm64
${{ env.GHCR_BACKEND_IMAGE }}:native-latest-arm64
cache-from: type=gha,scope=native-arm64
cache-to: type=gha,mode=max,scope=native-arm64
# Build Backend Native AMD64 Compatible (x86-64-v2 for old CPUs)
build-backend-native-amd64-compat:
needs: [prepare]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Backend Native AMD64 Compatible
uses: docker/build-push-action@v5
with:
context: .
file: backend/Dockerfile.native
platforms: linux/amd64
push: true
build-args: |
VERSION=${{ needs.prepare.outputs.version }}-native
QUARKUS_NATIVE_BUILD_ARGS=,-march=x86-64-v2
tags: |
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-amd64-compat
${{ env.DOCKERHUB_BACKEND_IMAGE }}:native-compat-amd64
${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-amd64-compat
${{ env.GHCR_BACKEND_IMAGE }}:native-compat-amd64
cache-from: type=gha,scope=native-compat-amd64
cache-to: type=gha,mode=max,scope=native-compat-amd64
# Build Backend Native ARM64 Compatible (armv8-a+nolse for Raspberry Pi)
build-backend-native-arm64-compat:
needs: [prepare]
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Backend Native ARM64 Compatible
uses: docker/build-push-action@v5
with:
context: .
file: backend/Dockerfile.native
platforms: linux/arm64
push: true
build-args: |
VERSION=${{ needs.prepare.outputs.version }}-native
QUARKUS_NATIVE_BUILD_ARGS=,-march=armv8-a+nolse
tags: |
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-arm64-compat
${{ env.DOCKERHUB_BACKEND_IMAGE }}:native-compat-arm64
${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-arm64-compat
${{ env.GHCR_BACKEND_IMAGE }}:native-compat-arm64
cache-from: type=gha,scope=native-compat-arm64
cache-to: type=gha,mode=max,scope=native-compat-arm64
# Build Frontend (multi-arch)
build-frontend:
needs: [prepare]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Frontend
uses: docker/build-push-action@v5
with:
context: .
file: frontend/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
build-args: |
VERSION=${{ needs.prepare.outputs.version }}
tags: |
${{ env.DOCKERHUB_FRONTEND_IMAGE }}:${{ needs.prepare.outputs.version }}
${{ env.DOCKERHUB_FRONTEND_IMAGE }}:latest
${{ env.GHCR_FRONTEND_IMAGE }}:${{ needs.prepare.outputs.version }}
${{ env.GHCR_FRONTEND_IMAGE }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
# Create multi-arch manifests for JVM backend
create-jvm-manifests:
needs: [prepare, build-backend-jvm-amd64, build-backend-jvm-arm64]
runs-on: ubuntu-latest
steps:
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push Docker Hub JVM manifests
run: |
# Create versioned manifest
docker buildx imagetools create \
-t ${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-jvm \
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-jvm-amd64 \
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-jvm-arm64
# Create latest manifest
docker buildx imagetools create \
-t ${{ env.DOCKERHUB_BACKEND_IMAGE }}:jvm-latest \
${{ env.DOCKERHUB_BACKEND_IMAGE }}:jvm-latest-amd64 \
${{ env.DOCKERHUB_BACKEND_IMAGE }}:jvm-latest-arm64
- name: Create and push GHCR JVM manifests
run: |
# Create versioned manifest
docker buildx imagetools create \
-t ${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-jvm \
${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-jvm-amd64 \
${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-jvm-arm64
# Create latest manifest
docker buildx imagetools create \
-t ${{ env.GHCR_BACKEND_IMAGE }}:jvm-latest \
${{ env.GHCR_BACKEND_IMAGE }}:jvm-latest-amd64 \
${{ env.GHCR_BACKEND_IMAGE }}:jvm-latest-arm64
# Create multi-arch manifests for native backend (optimized)
create-native-manifests:
needs: [prepare, build-backend-native-amd64, build-backend-native-arm64]
runs-on: ubuntu-latest
steps:
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push Docker Hub manifests
run: |
# Create versioned manifest
docker buildx imagetools create \
-t ${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native \
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-amd64 \
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-arm64
# Create latest manifests
docker buildx imagetools create \
-t ${{ env.DOCKERHUB_BACKEND_IMAGE }}:native-latest \
-t ${{ env.DOCKERHUB_BACKEND_IMAGE }}:latest \
${{ env.DOCKERHUB_BACKEND_IMAGE }}:native-latest-amd64 \
${{ env.DOCKERHUB_BACKEND_IMAGE }}:native-latest-arm64
- name: Create and push GHCR manifests
run: |
# Create versioned manifest
docker buildx imagetools create \
-t ${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native \
${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-amd64 \
${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-arm64
# Create latest manifests
docker buildx imagetools create \
-t ${{ env.GHCR_BACKEND_IMAGE }}:native-latest \
-t ${{ env.GHCR_BACKEND_IMAGE }}:latest \
${{ env.GHCR_BACKEND_IMAGE }}:native-latest-amd64 \
${{ env.GHCR_BACKEND_IMAGE }}:native-latest-arm64
# Create multi-arch manifests for native backend (compatible)
create-native-compat-manifests:
needs: [prepare, build-backend-native-amd64-compat, build-backend-native-arm64-compat]
runs-on: ubuntu-latest
steps:
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push Docker Hub compatible manifests
run: |
# Create versioned compat manifest
docker buildx imagetools create \
-t ${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-compat \
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-amd64-compat \
${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-arm64-compat
# Create latest compat manifest
docker buildx imagetools create \
-t ${{ env.DOCKERHUB_BACKEND_IMAGE }}:native-compat-latest \
-t ${{ env.DOCKERHUB_BACKEND_IMAGE }}:compat-latest \
${{ env.DOCKERHUB_BACKEND_IMAGE }}:native-compat-amd64 \
${{ env.DOCKERHUB_BACKEND_IMAGE }}:native-compat-arm64
- name: Create and push GHCR compatible manifests
run: |
# Create versioned compat manifest
docker buildx imagetools create \
-t ${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-compat \
${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-amd64-compat \
${{ env.GHCR_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-arm64-compat
# Create latest compat manifest
docker buildx imagetools create \
-t ${{ env.GHCR_BACKEND_IMAGE }}:native-compat-latest \
-t ${{ env.GHCR_BACKEND_IMAGE }}:compat-latest \
${{ env.GHCR_BACKEND_IMAGE }}:native-compat-amd64 \
${{ env.GHCR_BACKEND_IMAGE }}:native-compat-arm64
# Extract artifacts for non-Docker deployments (Proxmox VMs, bare metal, etc.)
extract-artifacts-amd64:
needs: [prepare]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Create artifacts directory
run: mkdir -p artifacts
- name: Extract frontend static files
run: |
echo "📦 Extracting frontend static files..."
docker build --target build \
--output type=local,dest=./temp-frontend \
-f frontend/Dockerfile .
echo "Verifying extracted frontend structure:"
ls -la temp-frontend/app/dist/
tar -czf artifacts/geopulse-frontend-${{ needs.prepare.outputs.version }}.tar.gz \
-C temp-frontend/app/dist .
echo "✅ Frontend: $(du -h artifacts/geopulse-frontend-${{ needs.prepare.outputs.version }}.tar.gz | cut -f1)"
- name: Extract backend JVM artifacts
run: |
echo "📦 Extracting backend JVM artifacts..."
docker build --target build \
--output type=local,dest=./temp-backend-jvm \
-f backend/Dockerfile .
echo "Verifying extracted backend JVM structure:"
ls -la temp-backend-jvm/app/backend/target/quarkus-app/
tar -czf artifacts/geopulse-backend-jvm-${{ needs.prepare.outputs.version }}.tar.gz \
-C temp-backend-jvm/app/backend/target quarkus-app
echo "✅ Backend JVM: $(du -h artifacts/geopulse-backend-jvm-${{ needs.prepare.outputs.version }}.tar.gz | cut -f1)"
- name: Extract backend native AMD64 (optimized)
run: |
echo "📦 Extracting backend native AMD64 (x86-64-v3)..."
docker build --target build \
--platform linux/amd64 \
--build-arg VERSION=${{ needs.prepare.outputs.version }}-native \
--build-arg QUARKUS_NATIVE_BUILD_ARGS= \
--output type=local,dest=./temp-native-amd64 \
-f backend/Dockerfile.native .
RUNNER=$(find temp-native-amd64/app/backend/target/ -name "*-runner" -type f | head -n 1)
if [ -z "$RUNNER" ]; then
echo "❌ Error: Native runner binary not found!"
exit 1
fi
if [ ! -f "$RUNNER" ]; then
echo "❌ Error: Runner file does not exist: $RUNNER"
exit 1
fi
cp "$RUNNER" artifacts/geopulse-backend-native-amd64-${{ needs.prepare.outputs.version }}
chmod +x artifacts/geopulse-backend-native-amd64-${{ needs.prepare.outputs.version }}
echo "✅ Backend Native AMD64: $(du -h artifacts/geopulse-backend-native-amd64-${{ needs.prepare.outputs.version }} | cut -f1)"
- name: Extract backend native AMD64 compatible (x86-64-v2)
run: |
echo "📦 Extracting backend native AMD64 compatible (x86-64-v2)..."
docker build --target build \
--platform linux/amd64 \
--build-arg VERSION=${{ needs.prepare.outputs.version }}-native \
--build-arg QUARKUS_NATIVE_BUILD_ARGS=",-march=x86-64-v2" \
--output type=local,dest=./temp-native-amd64-compat \
-f backend/Dockerfile.native .
RUNNER=$(find temp-native-amd64-compat/app/backend/target/ -name "*-runner" -type f | head -n 1)
if [ -z "$RUNNER" ]; then
echo "❌ Error: Native runner binary not found!"
exit 1
fi
if [ ! -f "$RUNNER" ]; then
echo "❌ Error: Runner file does not exist: $RUNNER"
exit 1
fi
cp "$RUNNER" artifacts/geopulse-backend-native-amd64-compat-${{ needs.prepare.outputs.version }}
chmod +x artifacts/geopulse-backend-native-amd64-compat-${{ needs.prepare.outputs.version }}
echo "✅ Backend Native AMD64 Compat: $(du -h artifacts/geopulse-backend-native-amd64-compat-${{ needs.prepare.outputs.version }} | cut -f1)"
- name: Validate AMD64 artifacts
run: |
echo "🔍 Validating AMD64 artifacts..."
EXPECTED_FILES=(
"geopulse-frontend-${{ needs.prepare.outputs.version }}.tar.gz"
"geopulse-backend-jvm-${{ needs.prepare.outputs.version }}.tar.gz"
"geopulse-backend-native-amd64-${{ needs.prepare.outputs.version }}"
"geopulse-backend-native-amd64-compat-${{ needs.prepare.outputs.version }}"
)
MISSING=0
for file in "${EXPECTED_FILES[@]}"; do
if [ ! -f "artifacts/$file" ]; then
echo "❌ Missing artifact: $file"
MISSING=1
else
SIZE=$(du -h "artifacts/$file" | cut -f1)
echo "✅ Found: $file ($SIZE)"
fi
done
if [ $MISSING -eq 1 ]; then
echo "❌ Some artifacts are missing!"
exit 1
fi
echo ""
echo "📊 Total AMD64 artifacts size:"
du -sh artifacts/ | cut -f1
- name: Upload AMD64 artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts-amd64
path: artifacts/
retention-days: 30
- name: Cleanup temporary directories
if: always()
run: |
rm -rf temp-*
# Extract ARM64 native binaries on ARM64 runner
extract-artifacts-arm64:
needs: [prepare]
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Create artifacts directory
run: mkdir -p artifacts
- name: Extract backend native ARM64 (optimized)
run: |
echo "📦 Extracting backend native ARM64 (armv8-a)..."
docker build --target build \
--platform linux/arm64 \
--build-arg VERSION=${{ needs.prepare.outputs.version }}-native \
--build-arg QUARKUS_NATIVE_BUILD_ARGS= \
--output type=local,dest=./temp-native-arm64 \
-f backend/Dockerfile.native .
RUNNER=$(find temp-native-arm64/app/backend/target/ -name "*-runner" -type f | head -n 1)
if [ -z "$RUNNER" ]; then
echo "❌ Error: Native runner binary not found!"
exit 1
fi
if [ ! -f "$RUNNER" ]; then
echo "❌ Error: Runner file does not exist: $RUNNER"
exit 1
fi
cp "$RUNNER" artifacts/geopulse-backend-native-arm64-${{ needs.prepare.outputs.version }}
chmod +x artifacts/geopulse-backend-native-arm64-${{ needs.prepare.outputs.version }}
echo "✅ Backend Native ARM64: $(du -h artifacts/geopulse-backend-native-arm64-${{ needs.prepare.outputs.version }} | cut -f1)"
- name: Extract backend native ARM64 compatible (Raspberry Pi)
run: |
echo "📦 Extracting backend native ARM64 compatible (armv8-a+nolse)..."
docker build --target build \
--platform linux/arm64 \
--build-arg VERSION=${{ needs.prepare.outputs.version }}-native \
--build-arg QUARKUS_NATIVE_BUILD_ARGS=",-march=armv8-a+nolse" \
--output type=local,dest=./temp-native-arm64-compat \
-f backend/Dockerfile.native .
RUNNER=$(find temp-native-arm64-compat/app/backend/target/ -name "*-runner" -type f | head -n 1)
if [ -z "$RUNNER" ]; then
echo "❌ Error: Native runner binary not found!"
exit 1
fi
if [ ! -f "$RUNNER" ]; then
echo "❌ Error: Runner file does not exist: $RUNNER"
exit 1
fi
cp "$RUNNER" artifacts/geopulse-backend-native-arm64-compat-${{ needs.prepare.outputs.version }}
chmod +x artifacts/geopulse-backend-native-arm64-compat-${{ needs.prepare.outputs.version }}
echo "✅ Backend Native ARM64 Compat: $(du -h artifacts/geopulse-backend-native-arm64-compat-${{ needs.prepare.outputs.version }} | cut -f1)"
- name: Validate ARM64 artifacts
run: |
echo "🔍 Validating ARM64 artifacts..."
EXPECTED_FILES=(
"geopulse-backend-native-arm64-${{ needs.prepare.outputs.version }}"
"geopulse-backend-native-arm64-compat-${{ needs.prepare.outputs.version }}"
)
MISSING=0
for file in "${EXPECTED_FILES[@]}"; do
if [ ! -f "artifacts/$file" ]; then
echo "❌ Missing artifact: $file"
MISSING=1
else
SIZE=$(du -h "artifacts/$file" | cut -f1)
echo "✅ Found: $file ($SIZE)"
fi
done
if [ $MISSING -eq 1 ]; then
echo "❌ Some artifacts are missing!"
exit 1
fi
echo ""
echo "📊 Total ARM64 artifacts size:"
du -sh artifacts/ | cut -f1
- name: Upload ARM64 artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts-arm64
path: artifacts/
retention-days: 30
- name: Cleanup temporary directories
if: always()
run: |
rm -rf temp-*
# Create GitHub Release with all artifacts
create-github-release:
needs: [prepare, extract-artifacts-amd64, extract-artifacts-arm64, build-frontend, create-jvm-manifests, create-native-manifests, create-native-compat-manifests]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download AMD64 artifacts
uses: actions/download-artifact@v4
with:
name: release-artifacts-amd64
path: artifacts/
- name: Download ARM64 artifacts
uses: actions/download-artifact@v4
with:
name: release-artifacts-arm64
path: artifacts/
- name: Generate checksums
run: |
cd artifacts
# Check if any artifacts exist
if ! ls geopulse-* 1> /dev/null 2>&1; then
echo "❌ Error: No artifacts found to checksum!"
exit 1
fi
sha256sum geopulse-* > SHA256SUMS
# Validate checksums file is not empty
if [ ! -s SHA256SUMS ]; then
echo "❌ Error: SHA256SUMS file is empty!"
exit 1
fi
# Count artifacts
ARTIFACT_COUNT=$(wc -l < SHA256SUMS)
echo "✅ Generated checksums for $ARTIFACT_COUNT artifacts"
echo ""
echo "📋 Checksums:"
cat SHA256SUMS
echo ""
echo "📊 Artifact sizes:"
du -h geopulse-* | sort -h
- name: Generate release notes
run: |
cat > RELEASE_NOTES.md << 'EOF'
# GeoPulse ${{ needs.prepare.outputs.version }}
## 🐳 Docker Images
All images are multi-architecture (AMD64/ARM64) and available on Docker Hub and GitHub Container Registry.
### Backend Images
```bash
# JVM (Multi-arch: AMD64, ARM64)
docker pull ${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-jvm
# Native (Multi-arch: AMD64, ARM64) - Optimized for modern CPUs
docker pull ${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native
# Native Compatible (Multi-arch) - For older CPUs and Raspberry Pi
docker pull ${{ env.DOCKERHUB_BACKEND_IMAGE }}:${{ needs.prepare.outputs.version }}-native-compat
```
### Frontend Image
```bash
# Multi-arch: AMD64, ARM64
docker pull ${{ env.DOCKERHUB_FRONTEND_IMAGE }}:${{ needs.prepare.outputs.version }}
```
## 📦 Bare Metal / Proxmox Deployment (No Docker)
### Quick Installation
```bash
curl -fsSL https://raw.githubusercontent.com/${{ github.repository }}/main/scripts/deploy-geopulse.sh | sudo bash -s -- ${{ needs.prepare.outputs.version }}
```
### Manual Installation
Download artifacts for your platform:
#### Frontend (Required, platform-independent)
- [`geopulse-frontend-${{ needs.prepare.outputs.version }}.tar.gz`](../../releases/download/v${{ needs.prepare.outputs.version }}/geopulse-frontend-${{ needs.prepare.outputs.version }}.tar.gz) - Static HTML/CSS/JS files
#### Backend (Choose ONE)
**Option 1: Native Backend** (Recommended - No Java required, lower memory, faster startup)
AMD64 (Intel/AMD):
- Modern CPUs (x86-64-v3): [`geopulse-backend-native-amd64-${{ needs.prepare.outputs.version }}`](../../releases/download/v${{ needs.prepare.outputs.version }}/geopulse-backend-native-amd64-${{ needs.prepare.outputs.version }})
- Older CPUs (x86-64-v2): [`geopulse-backend-native-amd64-compat-${{ needs.prepare.outputs.version }}`](../../releases/download/v${{ needs.prepare.outputs.version }}/geopulse-backend-native-amd64-compat-${{ needs.prepare.outputs.version }})
ARM64:
- Modern ARM64: [`geopulse-backend-native-arm64-${{ needs.prepare.outputs.version }}`](../../releases/download/v${{ needs.prepare.outputs.version }}/geopulse-backend-native-arm64-${{ needs.prepare.outputs.version }})
- Raspberry Pi 3/4: [`geopulse-backend-native-arm64-compat-${{ needs.prepare.outputs.version }}`](../../releases/download/v${{ needs.prepare.outputs.version }}/geopulse-backend-native-arm64-compat-${{ needs.prepare.outputs.version }})
**Option 2: JVM Backend** (Requires Java 25+)
- [`geopulse-backend-jvm-${{ needs.prepare.outputs.version }}.tar.gz`](../../releases/download/v${{ needs.prepare.outputs.version }}/geopulse-backend-jvm-${{ needs.prepare.outputs.version }}.tar.gz) - Works on any platform with Java
### System Requirements
**Minimum (Native Backend)**:
- 512 MB RAM (backend only)
- 2 GB RAM (with PostgreSQL + PostGIS)
- PostgreSQL 12+ with PostGIS extension
- Nginx or Apache
**Minimum (JVM Backend)**:
- 1 GB RAM (backend only)
- 2.5 GB RAM (with PostgreSQL + PostGIS)
- Java 25+ runtime
- PostgreSQL 12+ with PostGIS extension
- Nginx or Apache
### Upgrade from Previous Version
```bash
curl -fsSL https://raw.githubusercontent.com/${{ github.repository }}/main/scripts/upgrade-geopulse.sh -o upgrade-geopulse.sh
chmod +x upgrade-geopulse.sh
sudo ./upgrade-geopulse.sh ${{ needs.prepare.outputs.version }}
```
## ☸️ Kubernetes / Helm
```bash
helm repo add geopulse https://tess1o.github.io/geopulse/charts
helm repo update
helm install geopulse geopulse/geopulse --version ${{ needs.prepare.outputs.version }}
```
## 📚 Documentation
- [Full Documentation](https://tess1o.github.io/geopulse/)
- [Installation Guide](https://tess1o.github.io/geopulse/docs/getting-started/installation)
- [Configuration](https://tess1o.github.io/geopulse/docs/system-administration/configuration)
## ✅ Verification
All artifacts include SHA256 checksums. Download [`SHA256SUMS`](../../releases/download/v${{ needs.prepare.outputs.version }}/SHA256SUMS) and verify:
```bash
sha256sum -c SHA256SUMS
```
## 📝 What's Changed
<!-- Add your release notes here -->
**Full Changelog**: https://github.com/${{ github.repository }}/compare/v{previous}...v${{ needs.prepare.outputs.version }}
EOF
- name: Validate all artifacts before release
run: |
echo "🔍 Final validation of all artifacts..."
cd artifacts
EXPECTED_FILES=(
"geopulse-frontend-${{ needs.prepare.outputs.version }}.tar.gz"
"geopulse-backend-jvm-${{ needs.prepare.outputs.version }}.tar.gz"
"geopulse-backend-native-amd64-${{ needs.prepare.outputs.version }}"
"geopulse-backend-native-amd64-compat-${{ needs.prepare.outputs.version }}"
"geopulse-backend-native-arm64-${{ needs.prepare.outputs.version }}"
"geopulse-backend-native-arm64-compat-${{ needs.prepare.outputs.version }}"
"SHA256SUMS"
)
MISSING=0
for file in "${EXPECTED_FILES[@]}"; do
if [ ! -f "$file" ]; then
echo "❌ Missing: $file"
MISSING=1
else
SIZE=$(du -h "$file" | cut -f1)
echo "✅ Ready: $file ($SIZE)"
fi
done
if [ $MISSING -eq 1 ]; then
echo ""
echo "❌ Cannot create release: Some artifacts are missing!"
exit 1
fi
echo ""
echo "✅ All 7 artifacts ready for release!"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release v${{ needs.prepare.outputs.version }}
body_path: RELEASE_NOTES.md
draft: false
prerelease: false
files: |
artifacts/geopulse-frontend-${{ needs.prepare.outputs.version }}.tar.gz
artifacts/geopulse-backend-jvm-${{ needs.prepare.outputs.version }}.tar.gz
artifacts/geopulse-backend-native-amd64-${{ needs.prepare.outputs.version }}
artifacts/geopulse-backend-native-amd64-compat-${{ needs.prepare.outputs.version }}
artifacts/geopulse-backend-native-arm64-${{ needs.prepare.outputs.version }}
artifacts/geopulse-backend-native-arm64-compat-${{ needs.prepare.outputs.version }}
artifacts/SHA256SUMS
- name: Generate release summary
run: |
echo "## 🎉 Release v${{ needs.prepare.outputs.version }} Created!" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### 📦 Artifacts Published" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Artifact | Size | Type |" >> $GITHUB_STEP_SUMMARY
echo "|----------|------|------|" >> $GITHUB_STEP_SUMMARY
cd artifacts
for file in geopulse-*; do
SIZE=$(du -h "$file" | cut -f1)
TYPE=""
case "$file" in
*frontend*) TYPE="Frontend (All platforms)" ;;
*jvm*) TYPE="Backend JVM (All platforms)" ;;
*amd64-compat*) TYPE="Backend Native (AMD64 old CPUs)" ;;
*amd64*) TYPE="Backend Native (AMD64 modern)" ;;
*arm64-compat*) TYPE="Backend Native (ARM64 Raspberry Pi)" ;;
*arm64*) TYPE="Backend Native (ARM64 modern)" ;;
esac
echo "| \`$file\` | $SIZE | $TYPE |" >> $GITHUB_STEP_SUMMARY
done
echo "" >> $GITHUB_STEP_SUMMARY
TOTAL_SIZE=$(du -sh . | cut -f1)
echo "**Total release size:** $TOTAL_SIZE" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "🔗 **Release URL:** https://github.com/${{ github.repository }}/releases/tag/v${{ needs.prepare.outputs.version }}" >> $GITHUB_STEP_SUMMARY