feat: add a ghcr.io container artifact for metal-cli releases#252
feat: add a ghcr.io container artifact for metal-cli releases#252
Conversation
.goreleaser.yml
Outdated
| - image_templates: | ||
| - 'ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Tag }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' | ||
| dockerfile: Dockerfile | ||
| use: buildx |
There was a problem hiding this comment.
It looks like there may be an alternative approach where goreleaser copies the binaries it built into images without needing a redundant buildx build.
There was a problem hiding this comment.
We can consider that in the future.
There was a problem hiding this comment.
It seems like it won't work without that functionality, actually. Working on converting now.
There was a problem hiding this comment.
Why Can't we use the same container for local building purposes, we observed a couple issue in golang version compatibility issue ?
b9b3a73 to
28eb1cb
Compare
|
Build failed when I tried this in my fork: |
didn't see comment from marques about build failing
|
Needs fix for whatever build failure Marques hit. |
62114ff to
4070896
Compare
6c4f983 to
e126d80
Compare
cprivitere
left a comment
There was a problem hiding this comment.
Ok, i have configured the following:
- Use goreleaser's builtin ko functionality to build mutliplatform image for linux/amd64, linux/arm64, linux/arm/7
- Add opencontainer labels to the images
- Update the github action to login to the docker hub, ghcr.io, and quay.io registries
- Did a lot of testing with manual runs of goreleaser to validate syntax
Things that could still happen either in this PR or future PRs:
- Add a gomod section and leverage goreleaser's support to create a verifiable build
- use the built-in ko's functionality to create a SBOM for our images
- Configure docker manifest signing to sign the above SBOM
- Add windows images built on nanoserver (biggest barrier is a way to test them on our end as we all have Macs and no windows servers)
Things we need to do after accepting this PR
- Define the secrets referenced in the release.yml file, aka the quay.io and dockerhub logins. Similar formatting and naming as used in the cluster-api repository.
Signed-off-by: Marques Johansson <mjohansson@equinix.com>
Signed-off-by: Chris Privitere <23177737+cprivitere@users.noreply.github.com>
Signed-off-by: Chris Privitere <23177737+cprivitere@users.noreply.github.com>
Signed-off-by: Chris Privitere <23177737+cprivitere@users.noreply.github.com>
Signed-off-by: Chris Privitere <23177737+cprivitere@users.noreply.github.com>
Signed-off-by: Chris Privitere <23177737+cprivitere@users.noreply.github.com>
64d8f0c to
3e7b42c
Compare
fixes #122