diff --git a/.github/scripts/auto-tag.sh b/.github/scripts/auto-tag.sh index 1ab922e..f49fec0 100644 --- a/.github/scripts/auto-tag.sh +++ b/.github/scripts/auto-tag.sh @@ -65,7 +65,7 @@ target_paths() { nextjs) cat <<'EOF' examples/nextjs-vercel-ai-sdk-chat -dockerhub/nextjs-vercel-ai-sdk-chat.md +:(exclude)examples/nextjs-vercel-ai-sdk-chat/README.md .github/workflows/docker-publish.yml .github/workflows/docker-auto-tag.yml .github/scripts/auto-tag.sh @@ -74,7 +74,7 @@ EOF cli) cat <<'EOF' examples/gonkagate-chat-cli -dockerhub/gonkagate-chat-cli.md +:(exclude)examples/gonkagate-chat-cli/README.md .github/workflows/docker-publish.yml .github/workflows/docker-auto-tag.yml .github/scripts/auto-tag.sh diff --git a/.github/workflows/docker-auto-tag.yml b/.github/workflows/docker-auto-tag.yml index 5269ed5..afefb29 100644 --- a/.github/workflows/docker-auto-tag.yml +++ b/.github/workflows/docker-auto-tag.yml @@ -4,6 +4,11 @@ on: push: branches: - main + paths-ignore: + - "examples/dockerhub/**" + - "examples/nextjs-vercel-ai-sdk-chat/README.md" + - "examples/gonkagate-chat-cli/README.md" + - "examples/README.md" workflow_dispatch: inputs: dry_run: diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 7ea0c35..e4d97d8 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -143,7 +143,7 @@ jobs: password: ${{ env.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 + readme-filepath: ./examples/dockerhub/nextjs-vercel-ai-sdk-chat.md - name: Warn if Docker Hub overview update failed if: ${{ env.DOCKERHUB_DESCRIPTION_TOKEN != '' && steps.update_nextjs_overview.outcome == 'failure' }} @@ -262,7 +262,7 @@ jobs: password: ${{ env.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 + readme-filepath: ./examples/dockerhub/gonkagate-chat-cli.md - name: Warn if Docker Hub overview update failed if: ${{ env.DOCKERHUB_DESCRIPTION_TOKEN != '' && steps.update_cli_overview.outcome == 'failure' }} diff --git a/dockerhub/RELEASING.md b/examples/dockerhub/RELEASING.md similarity index 89% rename from dockerhub/RELEASING.md rename to examples/dockerhub/RELEASING.md index 02f77ee..eae53ac 100644 --- a/dockerhub/RELEASING.md +++ b/examples/dockerhub/RELEASING.md @@ -33,6 +33,12 @@ On every push to `main`, the workflow inspects changes and creates tags: - `nextjs-vX.Y.Z` for Next.js example changes - `cli-vX.Y.Z` for CLI example changes +Docs-only changes do not trigger auto-tag for these files: +- `examples/dockerhub/**` +- `examples/nextjs-vercel-ai-sdk-chat/README.md` +- `examples/gonkagate-chat-cli/README.md` +- `examples/README.md` + Important: - If `TAG_PUSH_TOKEN` is set, tags are pushed with that PAT. - If `TAG_PUSH_TOKEN` is missing, workflow falls back to `GITHUB_TOKEN` and explicitly dispatches `.github/workflows/docker-publish.yml` for newly created tags. @@ -56,7 +62,7 @@ When `nextjs-vX.Y.Z` or `cli-vX.Y.Z` is pushed, Docker images are published with - `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 set, workflow updates Docker Hub README/overview from `examples/dockerhub/*.md`; - if `DOCKERHUB_DESCRIPTION_TOKEN` is missing, publish continues and overview update is skipped. ## 5. Manual Dry Run diff --git a/dockerhub/gonkagate-chat-cli.md b/examples/dockerhub/gonkagate-chat-cli.md similarity index 78% rename from dockerhub/gonkagate-chat-cli.md rename to examples/dockerhub/gonkagate-chat-cli.md index b0e5bf3..ae7318f 100644 --- a/dockerhub/gonkagate-chat-cli.md +++ b/examples/dockerhub/gonkagate-chat-cli.md @@ -19,6 +19,18 @@ docker run -it --rm \ gonkagate/gonkagate-chat-cli:latest ``` +### Pull and Run with `-e` + +```bash +docker pull gonkagate/gonkagate-chat-cli:latest +docker run -it --rm \ + -e GONKAGATE_API_KEY=your_api_key \ + -e GONKAGATE_MODEL=your_model \ + gonkagate/gonkagate-chat-cli:latest +``` + +Configuration for this image is passed via environment variables (`-e`), not CLI flags. + Smoke check: ```bash diff --git a/dockerhub/nextjs-vercel-ai-sdk-chat.md b/examples/dockerhub/nextjs-vercel-ai-sdk-chat.md similarity index 76% rename from dockerhub/nextjs-vercel-ai-sdk-chat.md rename to examples/dockerhub/nextjs-vercel-ai-sdk-chat.md index b1ac4f5..348c25c 100644 --- a/dockerhub/nextjs-vercel-ai-sdk-chat.md +++ b/examples/dockerhub/nextjs-vercel-ai-sdk-chat.md @@ -21,6 +21,18 @@ docker run --rm -p 3000:3000 \ Open `http://localhost:3000` and send a message. +### Pull and Run with `-e` + +```bash +docker pull gonkagate/nextjs-vercel-ai-sdk-chat:latest +docker run --rm -p 3000:3000 \ + -e GONKAGATE_API_KEY=your_api_key \ + -e GONKAGATE_MODEL=your_model \ + gonkagate/nextjs-vercel-ai-sdk-chat:latest +``` + +Configuration for this image is passed via environment variables (`-e`), not CLI flags. + ## Tags - `latest`