Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2fcfb68
feat
mlajkim Jan 6, 2026
4c8b12e
fix
mlajkim Jan 6, 2026
f91edf5
feat
mlajkim Jan 6, 2026
ab7a9c6
feat
mlajkim Jan 7, 2026
df7b601
feat
mlajkim Jan 7, 2026
e3f4f41
feat
mlajkim Jan 7, 2026
b79bf6a
fix: regex
mlajkim Jan 7, 2026
4d4f1c5
fix
mlajkim Jan 7, 2026
09faec8
feat
mlajkim Jan 7, 2026
89b976e
feat
mlajkim Jan 7, 2026
b4b0abb
feat
mlajkim Jan 7, 2026
39eb0f8
feat
mlajkim Jan 7, 2026
f3af9a4
feat
mlajkim Jan 7, 2026
4328e89
feat
mlajkim Jan 7, 2026
d62bd99
fix: back
mlajkim Jan 7, 2026
a856477
chore: explicitly define Docker registry URL and image, removing dyna…
mlajkim Jan 7, 2026
0e934df
Merge branch 'master' into feat/add-arm64-supported
mlajkim Jan 7, 2026
cc0666c
feat
mlajkim Jan 7, 2026
714331d
docs: Clarify `BUILD_MATRIX` and musl library copying with comments, …
mlajkim Jan 7, 2026
fbd41c1
feat: Extract Docker build matrix and platform suffixes into a dedica…
mlajkim Jan 7, 2026
fee59f5
feat
mlajkim Jan 7, 2026
cb625d2
feat
mlajkim Jan 7, 2026
a2c9663
fix
mlajkim Jan 7, 2026
8f867bc
build: Switch Docker build-push-action to load images local only
mlajkim Jan 7, 2026
94f0018
feat: Conditionally push Docker images and run merge job based on Git…
mlajkim Jan 7, 2026
e584167
Apply suggestion from @mlajkim
mlajkim Jan 7, 2026
1235343
feat: Build and push Docker images to GitHub Container Registry as an…
mlajkim Jan 8, 2026
74226be
comment
mlajkim Jan 8, 2026
1558b4a
feat: name for step
mlajkim Jan 8, 2026
a608f94
feat
mlajkim Jan 8, 2026
cac68c5
feat
mlajkim Jan 8, 2026
d73e18b
feat: cleaner
mlajkim Jan 8, 2026
6170e00
feat
mlajkim Jan 8, 2026
7f605f0
comment
mlajkim Jan 8, 2026
f91de38
feat
mlajkim Jan 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/docker-build-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
branches: [ master ]

env:
DOCKER_BUILDX_PLATFORM: linux/amd64
DOCKER_BUILDX_PLATFORM: linux/amd64,linux/arm64
DOCKER_REGISTRY_ORG: athenz
# DOCKER_REGISTRY_USER: values for docker login is stored in repository variables
# DOCKER_REGISTRY_TOKEN_NAME: values for docker login is stored in repository variables
Expand Down Expand Up @@ -151,16 +151,25 @@ jobs:
# for latest tag
# latest=auto for tagging latest only for "master" branch
flavor: |
latest=true
latest=false # we want to make sure we only push latest tag from conditions defined ourselves
# eg. refs/heads/master
# eg. refs/pull/318/merge
# shorthand for {{major}}.{{minor}}.{{patch}} (can include pre-release)
tags: |
# If branch is master, main or default branch, push the latest tag image:
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}

# If the event is a official tag release starting with "v..."", push the latest tag image:
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}

# If it is PR version, push the pr-<pr-number> tag image:
type=ref,event=pr

type=semver,pattern=v{{version}}

# Any cron builds (scheduled workflows) push the nightly tag image:
type=schedule,pattern=nightly

# GitHub Action to login against a Docker registry.
Expand Down Expand Up @@ -210,11 +219,9 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
load: ${{ github.event_name == 'pull_request' }}
push: true # Always push,
load: false # Push any image, and pull from remote if needed for testing
tags: ${{ steps.meta.outputs.tags }}
# push: true
# load: false
# tags: ${{ env.DOCKER_REGISTRY_URL }}/${{ env.DOCKER_REGISTRY_ORG }}/${{ env.DOCKER_REGISTRY_IMAGE }}:nightly
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ env.DOCKER_BUILDX_PLATFORM }}
Expand Down
17 changes: 15 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ COPY . .

RUN adduser -H -S ${APP_NAME}



# 11m 56s
RUN BUILD_TIME=$(date -u +%Y%m%d-%H%M%S) \
&& GO_VERSION=$(go version | cut -d" " -f3,4) \
&& CGO_ENABLED=1 \
CGO_CXXFLAGS="-g -Ofast -march=native" \
CGO_FFLAGS="-g -Ofast -march=native" \
CGO_LDFLAGS="-g -Ofast -march=native" \
GOOS=$(go env GOOS) \
Expand All @@ -32,6 +33,18 @@ RUN BUILD_TIME=$(date -u +%Y%m%d-%H%M%S) \
GOEXPERIMENT=noswissmap \
go build -ldflags "-X 'main.Version=${VERSION} at ${BUILD_TIME} by ${GO_VERSION}' -linkmode=external" -a -o "/usr/bin/${APP_NAME}"

# RUN BUILD_TIME=$(date -u +%Y%m%d-%H%M%S) \
# && GO_VERSION=$(go version | cut -d" " -f3,4) \
# && CGO_ENABLED=1 \
# CGO_CXXFLAGS="-g -Ofast -march=native" \
# CGO_FFLAGS="-g -Ofast -march=native" \
# CGO_LDFLAGS="-g -Ofast -march=native" \
# GOOS=$(go env GOOS) \
# GOARCH=$(go env GOARCH) \
# GO111MODULE=on \
# GOEXPERIMENT=noswissmap \
# go build -ldflags "-X 'main.Version=${VERSION} at ${BUILD_TIME} by ${GO_VERSION}' -linkmode=external" -a -o "/usr/bin/${APP_NAME}"

# confirm dependency libraries & cleanup
RUN ldd "/usr/bin/${APP_NAME}"\
&& apk del build-dependencies --purge \
Expand Down
Loading