Skip to content

build(goreleaser): use dockers_v2 for container releases - #147

Merged
alexlovelltroy merged 3 commits into
mainfrom
fix/goreleaser-docker-v2
Nov 10, 2026
Merged

alexlovelltroy merged 3 commits into
mainfrom
fix/goreleaser-docker-v2

Conversation

@alexlovelltroy

Copy link
Copy Markdown
Member

Description

This pull request introduces a comprehensive overhaul of the release workflow, focusing on improving the reliability, security, and validation of release builds and published images. The changes replace the previous shared workflow with a custom, in-repo workflow that ensures consistent build environments, enforces provenance and SBOM (Software Bill of Materials) attestation, and adds rigorous validation and testing scripts for release artifacts. New scripts and tests have been added to verify that all release images and binaries meet production requirements and that published images are properly attested.

Release workflow improvements:

  • Replaces the shared go-build-release.yml workflow with a custom in-repo workflow in .github/workflows/Release.yml, ensuring builds run on ubuntu-24.04 for compatibility, and introducing explicit steps for Go setup, Docker buildx, cross-compilers, and attestation of binaries and images. The workflow now includes steps to select release or snapshot mode, build and release with GoReleaser, and attest both binaries and images with provenance. [1] [2] [3]

Build environment and tooling:

  • Adds a new composite GitHub Action .github/actions/release-setup/action.yml to standardize the Go toolchain, cross-compilers, and Docker BuildKit setup for consistent release builds across PRs and releases.

Validation and verification scripts:

  • Introduces .github/scripts/release_build.py, a Python script that validates release artifacts by checking that binaries and images for both amd64 and arm64 architectures are present, that images are properly attested with provenance and SBOMs, and that the OCI index structure meets production requirements.
  • Adds .github/scripts/release-image-digests.cjs, a Node.js script to select and verify the digests of published images for each architecture, ensuring only valid, versioned images are attested.

Testing for release validation:

  • Provides comprehensive tests for the new validation logic:
    • .github/scripts/test_release_build.py tests the Python validation of builds, OCI index, and production contract enforcement.
    • .github/scripts/release-image-digests.test.cjs tests the image digest selection logic, including error handling for missing or invalid digests. [1] [2]

Dependency management:

  • Adds .github/scripts/requirements-release.txt to specify the required Python dependencies (notably PyYAML) for running the new release validation scripts.

Checklist

  • My code follows the style guidelines of this project
  • I have added/updated comments where needed
  • I have added tests that prove my fix is effective or my feature works
  • I have run make test (or equivalent) locally and all tests pass
  • I have updated the relevant documentation (CLI examples, man pages, README, other docs, etc.)
  • DCO Sign-off: All commits are signed off (git commit -s) with my real name and email
  • REUSE Compliance:
    • Each new/modified source file has SPDX copyright and license headers
    • Any non-commentable files include a <filename>.license sidecar
    • All referenced licenses are present in the LICENSES/ directory

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Dependency update
  • Build system/CI

Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>
Comment thread .github/workflows/Release.yml Fixed
Comment thread .github/workflows/Release.yml Fixed
Comment thread .github/workflows/Release.yml Fixed
Comment thread .github/workflows/Release.yml Fixed
Comment thread .github/workflows/test.yaml Fixed
Comment thread .github/workflows/test.yaml Fixed
Comment thread .github/workflows/test.yaml Fixed
@synackd synackd changed the title Fix/goreleaser docker v2 build(goreleaser): use dockers_v2 for container releases Nov 9, 2026
Signed-off-by: Alex Lovell-Troy <alovelltroy@lanl.gov>

@synackd synackd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only concern is feature creep / increased maintenance with the added scripts and action; however, since we are trying to focus on transitioning to metadata-service, I'm willing to mention it here and accept it.

@alexlovelltroy
alexlovelltroy merged commit 3cfd4d5 into main Nov 10, 2026
16 checks passed
@synackd
synackd deleted the fix/goreleaser-docker-v2 branch November 10, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants