From ea0dea9c478af4842a1ac75e8f5f372635422040 Mon Sep 17 00:00:00 2001 From: Bence Csati Date: Thu, 21 Nov 2024 14:01:22 +0100 Subject: [PATCH 1/2] revert: arm64 build Signed-off-by: Bence Csati --- .github/workflows/base-ci-goreleaser.yaml | 3 +++ .github/workflows/base-release.yaml | 3 +++ .../ci-goreleaser-axoflow-otel-collector.yaml | 2 +- .../release-axoflow-otel-collector.yaml | 2 +- cmd/goreleaser/internal/configure.go | 5 +++- .../axoflow-otel-collector/.goreleaser.yaml | 24 +++++++++++++++++++ 6 files changed, 36 insertions(+), 3 deletions(-) diff --git a/.github/workflows/base-ci-goreleaser.yaml b/.github/workflows/base-ci-goreleaser.yaml index 3617cc3e..2b3b1f1b 100644 --- a/.github/workflows/base-ci-goreleaser.yaml +++ b/.github/workflows/base-ci-goreleaser.yaml @@ -22,6 +22,9 @@ jobs: matrix: GOOS: ${{ fromJSON( inputs.goos) }} GOARCH: ${{ fromJSON( inputs.goarch) }} + exclude: + - GOOS: windows + GOARCH: arm64 runs-on: ubuntu-24.04 steps: diff --git a/.github/workflows/base-release.yaml b/.github/workflows/base-release.yaml index be6060cc..c3b39c7d 100644 --- a/.github/workflows/base-release.yaml +++ b/.github/workflows/base-release.yaml @@ -22,6 +22,9 @@ jobs: matrix: GOOS: ${{ fromJSON( inputs.goos) }} GOARCH: ${{ fromJSON( inputs.goarch) }} + exclude: + - GOOS: windows + GOARCH: arm64 runs-on: ubuntu-24.04 steps: diff --git a/.github/workflows/ci-goreleaser-axoflow-otel-collector.yaml b/.github/workflows/ci-goreleaser-axoflow-otel-collector.yaml index f96328a6..bb8616e9 100644 --- a/.github/workflows/ci-goreleaser-axoflow-otel-collector.yaml +++ b/.github/workflows/ci-goreleaser-axoflow-otel-collector.yaml @@ -29,7 +29,7 @@ jobs: with: distribution: axoflow-otel-collector goos: '[ "linux", "windows" ]' - goarch: '[ "amd64"]' + goarch: '[ "amd64", "arm64"]' secrets: inherit package-tests: diff --git a/.github/workflows/release-axoflow-otel-collector.yaml b/.github/workflows/release-axoflow-otel-collector.yaml index f8f71e22..282e6701 100644 --- a/.github/workflows/release-axoflow-otel-collector.yaml +++ b/.github/workflows/release-axoflow-otel-collector.yaml @@ -11,6 +11,6 @@ jobs: with: distribution: axoflow-otel-collector goos: '[ "linux", "windows" ]' - goarch: '[ "amd64" ]' + goarch: '[ "amd64", "arm64"]' secrets: inherit permissions: write-all diff --git a/cmd/goreleaser/internal/configure.go b/cmd/goreleaser/internal/configure.go index 12cd7a76..2c28bb78 100644 --- a/cmd/goreleaser/internal/configure.go +++ b/cmd/goreleaser/internal/configure.go @@ -35,7 +35,7 @@ const ( var ( ImagePrefixes = []string{"ghcr.io/axoflow/axoflow-otel-collector"} - Architectures = []string{"amd64"} + Architectures = []string{"amd64", "arm64"} Goos = []string{"linux", "windows"} DefaultConfigDists = map[string]bool{ImageName: true} MSIWindowsDists = map[string]bool{ImageName: true} @@ -90,6 +90,9 @@ func Build(dist string) config.Build { }, Goos: Goos, Goarch: Architectures, + Ignore: []config.IgnoredBuild{ + {Goos: "windows", Goarch: "arm64"}, + }, } } diff --git a/distributions/axoflow-otel-collector/.goreleaser.yaml b/distributions/axoflow-otel-collector/.goreleaser.yaml index 29f203e2..b83b6508 100644 --- a/distributions/axoflow-otel-collector/.goreleaser.yaml +++ b/distributions/axoflow-otel-collector/.goreleaser.yaml @@ -17,6 +17,10 @@ builds: - windows goarch: - amd64 + - arm64 + ignore: + - goos: windows + goarch: arm64 dir: _build binary: axoflow-otel-collector ldflags: @@ -80,13 +84,33 @@ dockers: - --label=org.opencontainers.image.source={{.GitURL}} - --label=org.opencontainers.image.licenses=Apache-2.0 use: buildx + - goos: linux + goarch: arm64 + dockerfile: Dockerfile + image_templates: + - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:{{ .Version }}-arm64 + - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:latest-arm64 + extra_files: + - config.yaml + build_flag_templates: + - --pull + - --platform=linux/arm64 + - --label=org.opencontainers.image.created={{.Date}} + - --label=org.opencontainers.image.name={{.ProjectName}} + - --label=org.opencontainers.image.revision={{.FullCommit}} + - --label=org.opencontainers.image.version={{.Version}} + - --label=org.opencontainers.image.source={{.GitURL}} + - --label=org.opencontainers.image.licenses=Apache-2.0 + use: buildx docker_manifests: - name_template: ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:{{ .Version }} image_templates: - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:{{ .Version }}-amd64 + - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:{{ .Version }}-arm64 - name_template: ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:latest image_templates: - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:latest-amd64 + - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:latest-arm64 signs: - cmd: cosign args: From ad8157dc23a6c7b579d0f25353a1b969b80bb3ad Mon Sep 17 00:00:00 2001 From: Bence Csati Date: Thu, 21 Nov 2024 14:01:49 +0100 Subject: [PATCH 2/2] chore: use v2.3.2 for goreleaser action Signed-off-by: Bence Csati --- .github/workflows/base-ci-goreleaser.yaml | 2 +- .github/workflows/base-release.yaml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/base-ci-goreleaser.yaml b/.github/workflows/base-ci-goreleaser.yaml index 2b3b1f1b..81f1368e 100644 --- a/.github/workflows/base-ci-goreleaser.yaml +++ b/.github/workflows/base-ci-goreleaser.yaml @@ -60,7 +60,7 @@ jobs: uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro - version: ${{ env.GORELEASER_PRO_VERSION }} + version: v2.3.2 workdir: distributions/${{ inputs.distribution }} args: --snapshot --clean --skip=sign,sbom --timeout 2h --split env: diff --git a/.github/workflows/base-release.yaml b/.github/workflows/base-release.yaml index c3b39c7d..d7f97695 100644 --- a/.github/workflows/base-release.yaml +++ b/.github/workflows/base-release.yaml @@ -77,7 +77,7 @@ jobs: uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro - version: ${{ env.GORELEASER_PRO_VERSION }} + version: v2.3.2 workdir: distributions/${{ inputs.distribution }} args: release --clean --split --timeout 2h env: @@ -149,11 +149,10 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Run GoReleaser for ${{ inputs.distribution }} - id: goreleaser-action uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro - version: ${{ env.GORELEASER_PRO_VERSION }} + version: v2.3.2 workdir: distributions/${{ inputs.distribution }} args: continue --merge --timeout 2h env: