Skip to content

Commit 221d99d

Browse files
committed
Build full packages with goreleaser instead of binaries only
Change from 'goreleaser build --single-target' to 'goreleaser release --skip=sign,docker' to build complete .deb packages for all platforms (amd64, arm64) needed for Docker multi-platform build. Also update golang-cross version to 1.24-bookworm to match tyk-analytics. Related: TT-15971
1 parent eec470f commit 221d99d

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -560,30 +560,30 @@ jobs:
560560
restore-keys: |
561561
${{ runner.os }}-go-dashboard-
562562
563-
- name: Build dashboard binary and docker image
563+
- name: Build dashboard packages with goreleaser
564564
shell: bash
565565
env:
566566
ECR_REGISTRY: ${{ steps.ecr.outputs.registry }}
567-
IMAGE_TAG: sha-${{ github.sha }}
567+
IMAGE_TAG: tyk-${{ github.event.pull_request.number }}
568568
GOPRIVATE: github.com/TykTechnologies
569569
run: |
570-
echo "🔨 Building tyk-analytics with goreleaser"
571-
echo " Image: ${ECR_REGISTRY}/tyk-analytics:${IMAGE_TAG}"
570+
echo "🔨 Building tyk-analytics packages with goreleaser"
571+
echo " Target image: ${ECR_REGISTRY}/tyk-analytics:${IMAGE_TAG}"
572572
573-
# Build using goreleaser (similar to tyk-analytics release workflow)
573+
# Build using goreleaser (matching tyk-analytics release workflow)
574574
cat > /tmp/build-dashboard.sh <<'EOF'
575575
#!/bin/sh
576576
set -eax
577577
git config --global url."https://${{ secrets.ORG_GH_TOKEN }}@github.com".insteadOf "https://github.com"
578578
git config --global --add safe.directory /go/src/github.com/TykTechnologies/tyk-analytics
579579
580-
# Build binaries only (skip packaging)
581-
goreleaser build --clean -f ci/goreleaser/goreleaser.yml --snapshot --single-target
580+
# Build packages (binaries + deb/rpm) but skip signing and docker
581+
goreleaser release --clean -f ci/goreleaser/goreleaser.yml --snapshot --skip=sign,docker
582582
EOF
583583
584584
chmod +x /tmp/build-dashboard.sh
585585
586-
# Build in golang-cross container
586+
# Build in golang-cross container (same as tyk-analytics release)
587587
docker run --rm --privileged \
588588
-e GOPRIVATE=github.com/TykTechnologies \
589589
-e CGO_ENABLED=1 \
@@ -594,9 +594,9 @@ jobs:
594594
-e GOMODCACHE=/go/pkg/mod \
595595
-v /tmp/build-dashboard.sh:/tmp/build-dashboard.sh \
596596
-w /go/src/github.com/TykTechnologies/tyk-analytics \
597-
tykio/golang-cross:1.24-bullseye /tmp/build-dashboard.sh
597+
tykio/golang-cross:1.24-bookworm /tmp/build-dashboard.sh
598598
599-
echo "✅ Binary built successfully"
599+
echo "✅ Packages built successfully"
600600
601601
- name: Build and push dashboard Docker image
602602
uses: docker/build-push-action@v6

0 commit comments

Comments
 (0)