From 6739602df0c6f71061ee023abac694f24b7d9c8c Mon Sep 17 00:00:00 2001 From: razzle Date: Mon, 11 Mar 2024 18:55:43 -0500 Subject: [PATCH] fix(release): hotfix `publish` not respecting source package architecture (#2376) ## Description `zarf package publish ` would publish to CLI/runtime arch only and not respect source package's architecture, leading to packages existing at the wrong platform in the published index. ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [ ] Test, docs, adr added or updated as needed - [x] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed Signed-off-by: razzle --- .github/workflows/release.yml | 2 +- .goreleaser.yaml | 3 +++ src/pkg/packager/publish.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 80f1807878..d647b98c49 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Publish Zarf Packages on Tag +name: Release CLI and Packages on Tag permissions: contents: read diff --git a/.goreleaser.yaml b/.goreleaser.yaml index afb41ad4d1..fec6226549 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -76,6 +76,9 @@ brews: owner: defenseunicorns name: homebrew-tap token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" + pull_request: + enabled: true + commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" homepage: "https://zarf.dev/" description: "DevSecOps for Air Gap" diff --git a/src/pkg/packager/publish.go b/src/pkg/packager/publish.go index ae368a7afa..05ffe3bb4e 100644 --- a/src/pkg/packager/publish.go +++ b/src/pkg/packager/publish.go @@ -77,7 +77,7 @@ func (p *Packager) Publish() (err error) { if p.cfg.CreateOpts.IsSkeleton { platform = zoci.PlatformForSkeleton() } else { - platform = oci.PlatformForArch(config.GetArch()) + platform = oci.PlatformForArch(p.arch) } remote, err := zoci.NewRemote(ref, platform) if err != nil {