Skip to content

Commit 20bc4e9

Browse files
committed
feat: remove heighliner and replace with dockerfile
1 parent 0d675e1 commit 20bc4e9

3 files changed

Lines changed: 39 additions & 26 deletions

File tree

.github/workflows/docker-publish.yaml

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ on:
55
branches:
66
- '**'
77

8-
env:
9-
REGISTRY: ghcr.io
10-
IMAGE_NAME: ${{ github.repository }}
11-
128
jobs:
139
build-and-push-image:
1410
runs-on: ubuntu-latest
@@ -17,26 +13,26 @@ jobs:
1713
packages: write
1814

1915
steps:
20-
- name: Set up QEMU
21-
uses: docker/setup-qemu-action@v3
22-
23-
- name: Log in to the Container registry
16+
- name: Login to GitHub Container Registry
2417
uses: docker/login-action@v3
2518
with:
26-
registry: ${{ env.REGISTRY }}
19+
registry: ghcr.io
2720
username: ${{ github.actor }}
2821
password: ${{ secrets.GITHUB_TOKEN }}
2922

30-
- name: Build and push Docker image
31-
uses: strangelove-ventures/heighliner-build-action@v1.0.3
32-
with:
33-
# Heighliner fork supporting Go v1.24
34-
heighliner-owner: 'noble-assets'
35-
heighliner-tag: 'v1.7.3'
23+
- name: Set up QEMU
24+
uses: docker/setup-qemu-action@v3
25+
26+
- name: Set up Buildx
27+
uses: docker/setup-buildx-action@v3
3628

37-
# Heighliner chains.yaml config
38-
chain: noble
39-
dockerfile: cosmos
40-
build-target: make install
41-
binaries: |
42-
- /go/bin/nobled
29+
- name: Normalize Tag
30+
id: normalize
31+
run: echo "tag=$(echo ${{ github.ref_name }} | sed 's/[\/\.]/-/g')" >> $GITHUB_OUTPUT
32+
33+
- name: Build and Push Docker Image
34+
uses: docker/build-push-action@v6
35+
with:
36+
push: true
37+
tags: ghcr.io/${{ github.repository }}:${{ steps.normalize.outputs.tag }}
38+
platforms: linux/amd64,linux/arm64

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS nobled-builder
2+
3+
RUN apk add --no-cache \
4+
build-base \
5+
git \
6+
linux-headers
7+
8+
WORKDIR /src
9+
10+
COPY . .
11+
12+
# https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide
13+
ARG TARGETOS TARGETARCH
14+
15+
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build
16+
17+
FROM alpine:3
18+
19+
WORKDIR /root
20+
21+
COPY --from=nobled-builder /src/build/nobled /usr/bin/nobled

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,8 @@ swagger:
8888
###############################################################################
8989

9090
local-image:
91-
ifeq (,$(shell which heighliner))
92-
@echo heighliner not found. https://github.com/strangelove-ventures/heighliner
93-
else
9491
@echo "🤖 Building image..."
95-
@heighliner build --chain noble --local
92+
@docker build -t noble:local .
9693
@echo "✅ Completed build!"
97-
endif
9894

9995
.PHONY: license format lint build install local-image

0 commit comments

Comments
 (0)