Skip to content

Commit 1ebe09f

Browse files
committed
ci: use ghcr for server image
1 parent 3f656f3 commit 1ebe09f

File tree

3 files changed

+49
-28
lines changed

3 files changed

+49
-28
lines changed

.github/workflows/docker.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: docker/setup-qemu-action@v3
22+
23+
- uses: docker/setup-buildx-action@v3
24+
25+
- uses: docker/login-action@v3
26+
with:
27+
registry: ${{ env.REGISTRY }}
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- uses: docker/metadata-action@v5
32+
id: meta
33+
with:
34+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
35+
tags: |
36+
type=raw,value=latest
37+
type=sha
38+
39+
- uses: docker/build-push-action@v6
40+
with:
41+
context: .
42+
platforms: linux/amd64,linux/arm64
43+
push: true
44+
tags: ${{ steps.meta.outputs.tags }}
45+
labels: ${{ steps.meta.outputs.labels }}
46+
cache-from: type=gha
47+
cache-to: type=gha,mode=max

.github/workflows/main.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ Configuration can also be provided via environment variables: `CLIP_URL`, `CLIP_
152152

153153
### Deployment
154154

155-
Run via Docker Compose using the GitHub Container Registry image.
155+
Run via Docker Compose using the GitHub Container Registry image (`ghcr.io/bemoty/clip`).
156156

157157
```yaml
158158
services:
159159
clip:
160-
image: docker.pkg.github.com/bemoty/clip/app:latest
160+
image: ghcr.io/bemoty/clip:latest
161161
container_name: clip
162162
restart: unless-stopped
163163
ports:

0 commit comments

Comments
 (0)