From 1bc5b77bbfbecf02ab488daebd4092c04f88df8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ula=C5=9F?= Date: Wed, 10 Dec 2025 17:30:04 +0800 Subject: [PATCH 1/2] chore(docker/ci): add nightly docker image builds --- .github/workflows/docker-nightly.yaml | 66 +++++++++++++++++++++++++++ docker/README.md | 26 +++++++++++ 2 files changed, 92 insertions(+) create mode 100644 .github/workflows/docker-nightly.yaml diff --git a/.github/workflows/docker-nightly.yaml b/.github/workflows/docker-nightly.yaml new file mode 100644 index 0000000000..12342fc445 --- /dev/null +++ b/.github/workflows/docker-nightly.yaml @@ -0,0 +1,66 @@ +name: Build and Publish Nightly Docker Images + +on: + # Run nightly at 2 AM UTC + schedule: + - cron: '0 2 * * *' + # Allow manual trigger + workflow_dispatch: + +permissions: + contents: read + packages: write + +env: + REGISTRY: ghcr.io + REGISTRY_IMAGE: ghcr.io/op-rs/kona + +jobs: + build-nightly: + name: Build Nightly Images + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + target: [kona-node, kona-host, kona-supervisor] + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Authenticate with container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY_IMAGE }}/${{ matrix.target }} + tags: | + type=raw,value=nightly + type=raw,value=nightly-{{date 'YYYY-MM-DD'}} + + - name: Build and push multi-platform image + uses: docker/bake-action@v6 + env: + BIN_TARGET: ${{ matrix.target }} + REPO_LOCATION: local + PLATFORMS: linux/amd64,linux/arm64 + with: + files: | + ./docker/docker-bake.hcl + ${{ steps.meta.outputs.bake-file }} + targets: generic + push: true + + - name: Display image info + run: | + echo "✅ Successfully built and pushed ${{ matrix.target }}" + echo "📦 Image: ${{ env.REGISTRY_IMAGE }}/${{ matrix.target }}:nightly" + echo "🏷️ Tags: ${{ steps.meta.outputs.tags }}" \ No newline at end of file diff --git a/docker/README.md b/docker/README.md index 4a8dd09ab6..6545ec61c8 100644 --- a/docker/README.md +++ b/docker/README.md @@ -45,6 +45,32 @@ Create and activate a new builder and retry the bake command. docker buildx create --name kona-builder --use ``` +## Nightly Builds + +Nightly Docker images are automatically built and published every day at 2 AM UTC for: +- `kona-node` +- `kona-host` +- `kona-supervisor` + +### Using Nightly Images + +```sh +# Pull the latest nightly build (multi-platform: linux/amd64, linux/arm64) +docker pull ghcr.io/op-rs/kona/kona-node:nightly +docker pull ghcr.io/op-rs/kona/kona-host:nightly +docker pull ghcr.io/op-rs/kona/kona-supervisor:nightly + +# Pull a specific date's nightly build +docker pull ghcr.io/op-rs/kona/kona-node:nightly-2024-12-10 +``` + +### Manual Trigger + +To manually trigger a nightly build: +```sh +gh workflow run "Build and Publish Nightly Docker Images" +``` + ## Cutting a Release (for maintainers / forks) To cut a release of the docker image for any of the targets, cut a new annotated tag for the target like so: From 94ea98a04e84bc63f4b3d1266f3dc39629ed8510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ula=C5=9F?= Date: Fri, 12 Dec 2025 16:02:42 +0800 Subject: [PATCH 2/2] add kona-client --- .github/workflows/docker-nightly.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-nightly.yaml b/.github/workflows/docker-nightly.yaml index 12342fc445..94ef1797c2 100644 --- a/.github/workflows/docker-nightly.yaml +++ b/.github/workflows/docker-nightly.yaml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - target: [kona-node, kona-host, kona-supervisor] + target: [kona-node, kona-host, kona-supervisor, kona-client] steps: - name: Checkout uses: actions/checkout@v6