From 803056a22125197675330859f9734a9c474536b2 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Sat, 20 May 2023 11:58:30 -0700 Subject: [PATCH] Migrate container image builds to GitHub Workflows * Migrate from the internal Drone server using a GitHub Workflow to perform the multi-arch container image build * Use self-hosted GitHub runners on ARM64 to perform the ARM64 build step faster that QEMU/KVM emulation * Mandate approval for all workflow runs from outside contributors since the builds use push credentials and partially run internally --- .github/workflows/build.yaml | 13 +++++++++++++ Makefile | 14 ++++++++++++++ README.md | 1 + 3 files changed, 28 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..3062680 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,13 @@ +name: build +on: + push: + branches: + - main + pull_request: + branches: + - main +jobs: + multiarch: + uses: poseidon/fleetlock/.github/workflows/multiarch.yaml@main + secrets: + QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} diff --git a/Makefile b/Makefile index 3382252..c26315b 100644 --- a/Makefile +++ b/Makefile @@ -13,3 +13,17 @@ image-%: --arch $* --override-arch $* \ --format=docker . +push: \ + push-amd64 + push-arm64 + +push-%: + buildah tag $(LOCAL_REPO):$(VERSION)-$* $(IMAGE_REPO):$(VERSION)-$* + buildah push --format v2s2 $(IMAGE_REPO):$(VERSION)-$* + +manifest: + buildah manifest create $(IMAGE_REPO):$(VERSION) + buildah manifest add $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION)-amd64 + buildah manifest add --variant v8 $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION)-arm64 + buildah manifest inspect $(IMAGE_REPO):$(VERSION) + buildah manifest push -f v2s2 $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION) diff --git a/README.md b/README.md index 5076adc..dcb6767 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Kubelet [![Quay](https://img.shields.io/badge/container-quay-green)](https://quay.io/repository/poseidon/kubelet) [![Dockerhub](https://img.shields.io/badge/container-dockerhub-blue)](https://hub.docker.com/r/psdn/kubelet) +[![Workflow](https://github.com/poseidon/kubelet/actions/workflows/build.yaml/badge.svg)](https://github.com/poseidon/kubelet/actions/workflows/build.yaml?query=branch%3Amain) [![Sponsors](https://img.shields.io/github/sponsors/poseidon?logo=github)](https://github.com/sponsors/poseidon) [![Mastodon](https://img.shields.io/badge/follow-news-6364ff?logo=mastodon)](https://fosstodon.org/@typhoon)