Skip to content

Commit fcfdc17

Browse files
committed
fix(docker): add OCI labels, workspace fix, retry logic, and Docker Hub README sync
1 parent 3ae6356 commit fcfdc17

2 files changed

Lines changed: 33 additions & 3 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
- name: Log in to DockerHub
2828
uses: docker/login-action@v3
2929
with:
30-
username: ${{ secrets.DOCKERHUB_USERNAME }}
31-
password: ${{ secrets.DOCKERHUB_TOKEN }}
30+
username: ${{ secrets.DOCKER_USERNAME }}
31+
password: ${{ secrets.DOCKER_TOKEN }}
3232

3333
- name: Extract metadata
3434
id: meta
@@ -41,6 +41,12 @@ jobs:
4141
type=semver,pattern={{major}}.{{minor}}
4242
type=sha,prefix=
4343
type=raw,value=latest,enable={{is_default_branch}}
44+
labels: |
45+
org.opencontainers.image.title=OpenCodeHub
46+
org.opencontainers.image.description=A modern, self-hosted Git platform for teams that want speed, control, and clean workflows.
47+
org.opencontainers.image.url=https://github.com/swadhinbiswas/OpencodeHub
48+
org.opencontainers.image.source=https://github.com/swadhinbiswas/OpencodeHub
49+
org.opencontainers.image.licenses=MIT
4450
4551
- name: Build and push app image
4652
uses: docker/build-push-action@v5
@@ -63,5 +69,20 @@ jobs:
6369
tags: |
6470
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-runner:latest
6571
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-runner:${{ github.sha }}
72+
labels: |
73+
org.opencontainers.image.title=OpenCodeHub Runner
74+
org.opencontainers.image.description=CI/CD runner for OpenCodeHub
75+
org.opencontainers.image.url=https://github.com/swadhinbiswas/OpencodeHub
76+
org.opencontainers.image.source=https://github.com/swadhinbiswas/OpencodeHub
77+
org.opencontainers.image.licenses=MIT
6678
cache-from: type=gha
6779
cache-to: type=gha,mode=max
80+
81+
- name: Update Docker Hub Repository Description
82+
uses: peter-evans/dockerhub-description@v4
83+
with:
84+
username: ${{ secrets.DOCKER_USERNAME }}
85+
password: ${{ secrets.DOCKER_TOKEN }}
86+
repository: ${{ env.IMAGE_NAME }}
87+
readme-filepath: ./README.md
88+
short-description: "A modern, self-hosted Git platform with stacked PRs, merge queue, CI/CD, and AI review."

Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
FROM oven/bun:1 AS base
22
WORKDIR /app
3+
LABEL org.opencontainers.image.title="OpenCodeHub" \
4+
org.opencontainers.image.description="A modern, self-hosted Git platform with stacked PRs, merge queue, CI/CD, and AI review." \
5+
org.opencontainers.image.url="https://github.com/swadhinbiswas/OpencodeHub" \
6+
org.opencontainers.image.source="https://github.com/swadhinbiswas/OpencodeHub" \
7+
org.opencontainers.image.licenses="MIT"
38

49
# Install dependencies
510
FROM base AS deps
611
RUN apt-get update && apt-get install -y python3 make g++ gcc libc6-dev && rm -rf /var/lib/apt/lists/*
712
COPY package.json bun.lock ./
8-
RUN bun install --frozen-lockfile
13+
COPY cli/package.json ./cli/package.json
14+
RUN for i in 1 2 3; do \
15+
bun install --frozen-lockfile && break || \
16+
(echo "bun install attempt $i failed, retrying in 10s..." && sleep 10); \
17+
done
918

1019
# Build the application
1120
FROM base AS builder

0 commit comments

Comments
 (0)