File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 branches :
66 - ' **'
77
8- env :
9- REGISTRY : ghcr.io
10- IMAGE_NAME : ${{ github.repository }}
11-
128jobs :
139 build-and-push-image :
1410 runs-on : ubuntu-latest
@@ -17,26 +13,27 @@ 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+ context : .
37+ push : true
38+ tags : ghcr.io/${{ github.repository }}:${{ steps.normalize.outputs.tag }}
39+ platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -88,12 +88,8 @@ swagger:
8888# ##############################################################################
8989
9090local-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
You can’t perform that action at this time.
0 commit comments