Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

Commit a7c5c80

Browse files
chore(docker/ci): add nightly docker image builds (#3180)
Closes #3163 Adds a scheduled workflow to build nightly docker images for `kona-node`, `kona-host`, and `kona-supervisor`. Runs daily at 2 AM UTC, builds for both amd64 and arm64. Images are pushed to ghcr.io with `nightly` and `nightly-YYYY-MM-DD` tags. Can also be triggered manually via workflow_dispatch.
1 parent 44e80b5 commit a7c5c80

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build and Publish Nightly Docker Images
2+
3+
on:
4+
# Run nightly at 2 AM UTC
5+
schedule:
6+
- cron: '0 2 * * *'
7+
# Allow manual trigger
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
packages: write
13+
14+
env:
15+
REGISTRY: ghcr.io
16+
REGISTRY_IMAGE: ghcr.io/op-rs/kona
17+
18+
jobs:
19+
build-nightly:
20+
name: Build Nightly Images
21+
runs-on: ubuntu-latest
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
target: [kona-node, kona-host, kona-supervisor, kona-client]
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v6
29+
30+
- name: Set up Docker Buildx
31+
uses: docker/setup-buildx-action@v3
32+
33+
- name: Authenticate with container registry
34+
uses: docker/login-action@v3
35+
with:
36+
registry: ${{ env.REGISTRY }}
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
39+
40+
- name: Generate Docker metadata
41+
id: meta
42+
uses: docker/metadata-action@v5
43+
with:
44+
images: ${{ env.REGISTRY_IMAGE }}/${{ matrix.target }}
45+
tags: |
46+
type=raw,value=nightly
47+
type=raw,value=nightly-{{date 'YYYY-MM-DD'}}
48+
49+
- name: Build and push multi-platform image
50+
uses: docker/bake-action@v6
51+
env:
52+
BIN_TARGET: ${{ matrix.target }}
53+
REPO_LOCATION: local
54+
PLATFORMS: linux/amd64,linux/arm64
55+
with:
56+
files: |
57+
./docker/docker-bake.hcl
58+
${{ steps.meta.outputs.bake-file }}
59+
targets: generic
60+
push: true
61+
62+
- name: Display image info
63+
run: |
64+
echo "✅ Successfully built and pushed ${{ matrix.target }}"
65+
echo "📦 Image: ${{ env.REGISTRY_IMAGE }}/${{ matrix.target }}:nightly"
66+
echo "🏷️ Tags: ${{ steps.meta.outputs.tags }}"

docker/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,32 @@ Create and activate a new builder and retry the bake command.
4545
docker buildx create --name kona-builder --use
4646
```
4747

48+
## Nightly Builds
49+
50+
Nightly Docker images are automatically built and published every day at 2 AM UTC for:
51+
- `kona-node`
52+
- `kona-host`
53+
- `kona-supervisor`
54+
55+
### Using Nightly Images
56+
57+
```sh
58+
# Pull the latest nightly build (multi-platform: linux/amd64, linux/arm64)
59+
docker pull ghcr.io/op-rs/kona/kona-node:nightly
60+
docker pull ghcr.io/op-rs/kona/kona-host:nightly
61+
docker pull ghcr.io/op-rs/kona/kona-supervisor:nightly
62+
63+
# Pull a specific date's nightly build
64+
docker pull ghcr.io/op-rs/kona/kona-node:nightly-2024-12-10
65+
```
66+
67+
### Manual Trigger
68+
69+
To manually trigger a nightly build:
70+
```sh
71+
gh workflow run "Build and Publish Nightly Docker Images"
72+
```
73+
4874
## Cutting a Release (for maintainers / forks)
4975

5076
To cut a release of the docker image for any of the targets, cut a new annotated tag for the target like so:

0 commit comments

Comments
 (0)