-
-
Notifications
You must be signed in to change notification settings - Fork 270
102 lines (86 loc) · 2.95 KB
/
Copy pathdocker-publish.yml
File metadata and controls
102 lines (86 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: HolyClaude — Build & Push to Docker Hub + GHCR
run-name: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || github.workflow }}
on:
workflow_dispatch:
push:
tags:
- 'v*'
concurrency:
group: docker-${{ github.ref }}
cancel-in-progress: true
env:
DOCKERHUB_IMAGE: coderluii/holyclaude
GHCR_IMAGE: ghcr.io/coderluii/holyclaude
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
max-parallel: 1
matrix:
variant: [slim, full]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache
sudo apt-get clean
docker system prune -af
df -h
- name: Set up QEMU (multi-arch)
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to Docker Hub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v6
with:
images: |
${{ env.DOCKERHUB_IMAGE }}
${{ env.GHCR_IMAGE }}
tags: |
type=raw,value=latest,enable=${{ matrix.variant == 'full' }}
type=raw,value=slim,enable=${{ matrix.variant == 'slim' }}
type=semver,pattern={{version}},enable=${{ matrix.variant == 'full' }}
type=semver,pattern={{version}}-slim,enable=${{ matrix.variant == 'slim' }}
- name: Build and push
uses: docker/build-push-action@v7
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VARIANT=${{ matrix.variant }}
cache-from: type=gha,scope=${{ matrix.variant }}
cache-to: type=gha,mode=max,scope=${{ matrix.variant }}
update-dockerhub-description:
runs-on: ubuntu-latest
needs: build-and-push
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Update Docker Hub description
uses: peter-evans/dockerhub-description@v5
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: coderluii/holyclaude
short-description: "AI coding workstation: Claude Code + web UI + 7 AI CLIs + headless browser + 50+ tools"
readme-filepath: ./docs/dockerhub-description.md