Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,20 @@ jobs:
add_latest="false"
if [[ "$version" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
add_latest="true"
add_major="true"
major="${BASH_REMATCH[1]}"
if (( major >= 1 )); then
add_major="true"
fi
fi
else
version="${{ github.event.inputs.version }}"
version="${version#v}"
add_latest="${{ github.event.inputs.push_latest }}"
if [[ "$version" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
add_major="true"
major="${BASH_REMATCH[1]}"
if (( major >= 1 )); then
add_major="true"
fi
fi
fi

Expand Down Expand Up @@ -129,20 +133,26 @@ jobs:

- name: Update Docker Hub Overview
id: update_nextjs_overview
if: ${{ secrets.DOCKERHUB_DESCRIPTION_TOKEN != '' }}
continue-on-error: true
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
password: ${{ secrets.DOCKERHUB_DESCRIPTION_TOKEN }}
repository: ${{ env.NEXTJS_IMAGE }}
short-description: Next.js Vercel AI SDK chat Docker image for GonkaGate OpenAI-compatible API.
readme-filepath: ./dockerhub/nextjs-vercel-ai-sdk-chat.md

- name: Warn if Docker Hub overview update failed
if: steps.update_nextjs_overview.outcome == 'failure'
if: secrets.DOCKERHUB_DESCRIPTION_TOKEN != '' && steps.update_nextjs_overview.outcome == 'failure'
run: |
echo "::warning::Docker Hub overview update failed for ${{ env.NEXTJS_IMAGE }}. Image publish step already completed."

- name: Skip Docker Hub overview update (token not configured)
if: ${{ secrets.DOCKERHUB_DESCRIPTION_TOKEN == '' }}
run: |
echo "::notice::Skipping Docker Hub overview update for ${{ env.NEXTJS_IMAGE }} because DOCKERHUB_DESCRIPTION_TOKEN is not configured."

publish-cli:
name: Publish CLI Image
runs-on: ubuntu-latest
Expand Down Expand Up @@ -179,16 +189,20 @@ jobs:
add_latest="false"
if [[ "$version" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
add_latest="true"
add_major="true"
major="${BASH_REMATCH[1]}"
if (( major >= 1 )); then
add_major="true"
fi
fi
else
version="${{ github.event.inputs.version }}"
version="${version#v}"
add_latest="${{ github.event.inputs.push_latest }}"
if [[ "$version" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
add_major="true"
major="${BASH_REMATCH[1]}"
if (( major >= 1 )); then
add_major="true"
fi
fi
fi

Expand Down Expand Up @@ -236,16 +250,22 @@ jobs:

- name: Update Docker Hub Overview
id: update_cli_overview
if: ${{ secrets.DOCKERHUB_DESCRIPTION_TOKEN != '' }}
continue-on-error: true
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
password: ${{ secrets.DOCKERHUB_DESCRIPTION_TOKEN }}
repository: ${{ env.CLI_IMAGE }}
short-description: Go chat CLI Docker image for GonkaGate OpenAI-compatible API with streaming.
readme-filepath: ./dockerhub/gonkagate-chat-cli.md

- name: Warn if Docker Hub overview update failed
if: steps.update_cli_overview.outcome == 'failure'
if: secrets.DOCKERHUB_DESCRIPTION_TOKEN != '' && steps.update_cli_overview.outcome == 'failure'
run: |
echo "::warning::Docker Hub overview update failed for ${{ env.CLI_IMAGE }}. Image publish step already completed."

- name: Skip Docker Hub overview update (token not configured)
if: ${{ secrets.DOCKERHUB_DESCRIPTION_TOKEN == '' }}
run: |
echo "::notice::Skipping Docker Hub overview update for ${{ env.CLI_IMAGE }} because DOCKERHUB_DESCRIPTION_TOKEN is not configured."
7 changes: 6 additions & 1 deletion dockerhub/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This repository supports automatic Docker image tagging and publishing for:
3. In GitHub repository settings, add Actions secrets:
- `DOCKERHUB_USERNAME`
- `DOCKERHUB_TOKEN`
- `DOCKERHUB_DESCRIPTION_TOKEN` (optional; only for Docker Hub "Repository overview" updates)
- `TAG_PUSH_TOKEN` (optional; only needed if you want tag-push to be done by PAT)

Never commit the token into the repository.
Expand Down Expand Up @@ -51,9 +52,13 @@ Workflow: `.github/workflows/docker-publish.yml`
When `nextjs-vX.Y.Z` or `cli-vX.Y.Z` is pushed, Docker images are published with:

- exact `X.Y.Z`
- floating major `X`
- floating major `X` (only for `X >= 1`)
- `latest` (only for stable `X.Y.Z` versions)

Docker Hub overview behavior:
- if `DOCKERHUB_DESCRIPTION_TOKEN` is set, workflow updates Docker Hub README/overview from `dockerhub/*.md`;
- if `DOCKERHUB_DESCRIPTION_TOKEN` is missing, publish continues and overview update is skipped.

## 5. Manual Dry Run

You can run auto-tag manually from GitHub Actions:
Expand Down
2 changes: 1 addition & 1 deletion dockerhub/gonkagate-chat-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ docker run --rm \

- `latest`
- `<semver>` (for example `0.1.0`)
- `<major>` (for example `0`, `1`, `2`)
- `<major>` (for example `1`, `2`; published for major versions `>= 1`)

## Key Environment Variables

Expand Down
2 changes: 1 addition & 1 deletion dockerhub/nextjs-vercel-ai-sdk-chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Open `http://localhost:3000` and send a message.

- `latest`
- `<semver>` (for example `0.1.0`)
- `<major>` (for example `0`, `1`, `2`)
- `<major>` (for example `1`, `2`; published for major versions `>= 1`)

## Key Environment Variables

Expand Down