Skip to content

Commit 44d968f

Browse files
t-aleksanderteonj-chmielewskiAdam CiarcińskiMaciek
authored
merge dev -> main (1.0.0) (#96)
* skip manual config step * better ux * eslint * cleanup * update protobufs (#88) * feat: config polling (#86) * CI: fix re-creating manifests * chore: log version with git commit hash on startup (#89) * update protobufs (#90) * Rework instance config fetching (#91) * instance config fetching rework * update protobufs * add teonite link (#92) * add link * noreferrer * add defguard link * Basic nix flake without rust * Flake update * enable ARMv7 build (#93) Co-authored-by: Maciej Wójcik <maciek@wjck.pl> * Make a pre-release and release docker build workflow (#94) * split builds * fix vergen * add flavor to build-docker workflow * bump version to 1.0.0 (#95) --------- Co-authored-by: Robert Olejnik <r@nxt.cx> Co-authored-by: Jacek Chmielewski <jchmielewski@teonite.com> Co-authored-by: Adam Ciarciński <aciarcinski@teonite.com> Co-authored-by: Maciek <mwojcik@teonite.com> Co-authored-by: Maciej Wójcik <maciek@wjck.pl>
1 parent ba1cc4e commit 44d968f

29 files changed

Lines changed: 548 additions & 75 deletions

File tree

.github/workflows/build-docker.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
description: "List of tags as key-value pair attributes"
88
required: false
99
type: string
10+
flavor:
11+
description: "List of flavors as key-value pair attributes"
12+
required: false
13+
type: string
1014

1115
env:
1216
GHCR_REPO: ghcr.io/defguard/defguard-proxy
@@ -19,12 +23,17 @@ jobs:
1923
- ${{ matrix.runner }}
2024
strategy:
2125
matrix:
22-
cpu: [arm64, amd64]
26+
cpu: [arm64, amd64, arm/v7]
2327
include:
2428
- cpu: arm64
2529
runner: ARM64
30+
tag: arm64
2631
- cpu: amd64
2732
runner: X64
33+
tag: amd64
34+
- cpu: arm/v7
35+
runner: ARM
36+
tag: armv7
2837
steps:
2938
- name: Checkout
3039
uses: actions/checkout@v4
@@ -49,7 +58,7 @@ jobs:
4958
platforms: linux/${{ matrix.cpu }}
5059
provenance: false
5160
push: true
52-
tags: ${{ env.GHCR_REPO }}:${{ github.sha }}-${{ matrix.cpu }}
61+
tags: "${{ env.GHCR_REPO }}:${{ github.sha }}-${{ matrix.tag }}"
5362
cache-from: type=gha
5463
cache-to: type=gha,mode=max
5564

@@ -63,6 +72,7 @@ jobs:
6372
with:
6473
images: |
6574
${{ env.GHCR_REPO }}
75+
flavor: ${{ inputs.flavor }}
6676
tags: ${{ inputs.tags }}
6777
- name: Login to GitHub container registry
6878
uses: docker/login-action@v3
@@ -75,6 +85,7 @@ jobs:
7585
tags='${{ env.GHCR_REPO }}:${{ github.sha }} ${{ steps.meta.outputs.tags }}'
7686
for tag in ${tags}
7787
do
78-
docker manifest create --amend ${tag} ${{ env.GHCR_REPO }}:${{ github.sha }}-amd64 ${{ env.GHCR_REPO }}:${{ github.sha }}-arm64
88+
docker manifest rm ${tag} || true
89+
docker manifest create ${tag} ${{ env.GHCR_REPO }}:${{ github.sha }}-amd64 ${{ env.GHCR_REPO }}:${{ github.sha }}-arm64 ${{ env.GHCR_REPO }}:${{ github.sha }}-armv7
7990
docker manifest push ${tag}
8091
done

.github/workflows/release.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
jobs:
13-
build-latest:
13+
build-docker-release:
14+
# Ignore tags with -, like v1.0.0-alpha
15+
# This job will build the docker container with the "latest" tag which
16+
# is a tag used in production, thus it should only be run for full releases.
17+
if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-')
18+
name: Build Release Docker image
1419
uses: ./.github/workflows/build-docker.yml
1520
with:
1621
tags: |
@@ -19,6 +24,20 @@ jobs:
1924
type=semver,pattern={{major}}.{{minor}}
2025
type=sha
2126
27+
build-docker-prerelease:
28+
# Only build tags with -, like v1.0.0-alpha
29+
if: startsWith(github.ref, 'refs/tags/') && contains(github.ref, '-')
30+
name: Build Pre-release Docker image
31+
uses: ./.github/workflows/build-docker.yml
32+
with:
33+
tags: |
34+
type=raw,value=pre-release
35+
type=semver,pattern={{version}}
36+
type=sha
37+
# Explicitly disable latest tag. It will be added otherwise.
38+
flavor: |
39+
latest=false
40+
2241
create-release:
2342
name: create-release
2443
runs-on: self-hosted

0 commit comments

Comments
 (0)