feat: Add ko build for Go Releaser #506
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request updates the container image build and release pipeline to use the
ko
tool instead of Docker Buildx, and refactors how image names are generated and tagged. It also introduces several configuration improvements for reproducibility and clarity in the release process.Build and Release Pipeline Modernization:
ko-build/[email protected]
in both.github/workflows/ci.yaml
and.github/workflows/release.yaml
, simplifying the workflow and enabling native Go container builds. [1] [2]ko login
instead of the Docker login action for consistency with the new build tool. [1] [2]Image Naming and Tagging Improvements:
IMAGE_NAME
in.goreleaser.yaml
to derive the image name from the Git repository URL, making it more flexible and less hardcoded.latest
only for non-snapshot builds and introduces a more descriptivesha-<commit>
tag for main branch builds.Release and Snapshot Configuration:
snapshot
section to.goreleaser.yaml
to generate snapshot versions with a-next
suffix for pre-release builds.IS_RELEASE=true
and updatesGORELEASER_EXTRA_FLAGS
to include--clean
for release builds in the CI workflow.Container Build Customization:
docker.io/chainguard/static
as the base image, disables SBOM generation, and sets additional metadata such as creation time and supported platforms for reproducibility. [1] [2]Minor Formatting and Consistency Updates:
checksums.txt
and explicitly settingskip: false
for builds.## DescriptionFixes: #
How Has This Been Tested?
How are existing users impacted? What migration steps/scripts do we need?
Checklist:
I have: