attestantio / vouch

Apache License 2.0
107 stars 29 forks source link

Feature: Support publishing releases and development builds via GitHub Packages Registry #214

Open sambacha opened 2 months ago

sambacha commented 2 months ago

Leverage GitHub Packages

GitHub Packages https://github.com/orgs/attestantio/packages would allow for automated builds on the master branch (as an example) as well as cut 'Release' versions to be accessible.

Attestant currently does publish to Docker Hub, however the publishing workflow for building and pushing the Dockerfile is not public. Vouch Builds are located at: https://hub.docker.com/r/attestant/vouch, however only x86 Linux is available even though Attestant provides compiled binaries for Windows and macOS. Creating a docker-bake.hcl file would enable support for those architectures. For reference, see https://github.com/docker/metadata-action#bake-definition.

If you are open to accepting a PR to add support for publishing to GitHub packages, I would be happy to do so. However, the details of the docker hub publishing pipeline should be considered to not have any drift between the two registries insofar as published artifacts are concerned.

docker-bake.hcl example

# -*- hcl -*-

/** Special target: https://github.com/docker/metadata-action#bake-definition */
// docker-bake.hcl
target "docker-metadata-action" {}

target "build" {
  inherits = ["docker-metadata-action"]
  context = "./"
  dockerfile = "Dockerfile"
  platforms = [
    "linux/amd64"
    // additional platforms go here
  ]
}
mcdee commented 1 month ago

I haven't looked into the docker workflow beyond what we have at current, but if it is possible to create docker builds with multiple architectures we'd be open to a PR that provided this.