Skip to content

Commit eca01c6

Browse files
committed
Publish Docker image to ghcr.io on release
Add docker job to release workflow that builds and pushes to ghcr.io/nullclaw/nullclaw with version and latest tags. Remove sqlite-dev from Dockerfile (now provided by zon package).
1 parent f31b16f commit eca01c6

2 files changed

Lines changed: 40 additions & 1 deletion

File tree

‎.github/workflows/release.yml‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,42 @@ jobs:
5454
nullclaw-linux-x86_64.bin
5555
nullclaw-macos-aarch64.bin
5656
generate_release_notes: true
57+
58+
docker:
59+
needs: release
60+
runs-on: ubuntu-latest
61+
permissions:
62+
contents: read
63+
packages: write
64+
65+
steps:
66+
- uses: actions/checkout@v4
67+
68+
- name: Set up Docker Buildx
69+
uses: docker/setup-buildx-action@v3
70+
71+
- name: Log in to ghcr.io
72+
uses: docker/login-action@v3
73+
with:
74+
registry: ghcr.io
75+
username: ${{ github.actor }}
76+
password: ${{ secrets.GITHUB_TOKEN }}
77+
78+
- name: Extract metadata
79+
id: meta
80+
uses: docker/metadata-action@v5
81+
with:
82+
images: ghcr.io/${{ github.repository }}
83+
tags: |
84+
type=semver,pattern={{raw}}
85+
type=raw,value=latest
86+
87+
- name: Build and push
88+
uses: docker/build-push-action@v6
89+
with:
90+
context: .
91+
push: true
92+
tags: ${{ steps.meta.outputs.tags }}
93+
labels: ${{ steps.meta.outputs.labels }}
94+
cache-from: type=gha
95+
cache-to: type=gha,mode=max

‎Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# ── Stage 1: Build ────────────────────────────────────────────
44
FROM alpine:3.21 AS builder
55

6-
RUN apk add --no-cache zig sqlite-dev musl-dev
6+
RUN apk add --no-cache zig musl-dev
77

88
WORKDIR /app
99
COPY build.zig build.zig.zon src/ src/

0 commit comments

Comments
 (0)