Skip to content

Improve repository and registry parameterization#4

Merged
chaptersix merged 1 commit intomainfrom
fix-ghcr-registry-prefix
Nov 21, 2025
Merged

Improve repository and registry parameterization#4
chaptersix merged 1 commit intomainfrom
fix-ghcr-registry-prefix

Conversation

@chaptersix
Copy link
Owner

Summary

Makes Docker image publishing fully configurable while maintaining backward compatibility with both temporalio (Docker Hub) and forks (GHCR).

Changes

New Workflow Inputs (all optional with smart defaults)

  • registry: Container registry (docker.io, ghcr.io, etc.)
  • registry_namespace: Organization/user (defaults to repository_owner)
  • image_name: Image name (defaults to "temporal")

Key Improvements

  1. Smart auto-detection:

    • temporalio/clidocker.io/temporalio/temporal
    • Forks → ghcr.io/{owner}/temporal
  2. Conditional authentication:

    • GHCR: Uses GITHUB_TOKEN
    • Docker Hub: Uses DOCKER_USERNAME/DOCKER_PASSWORD secrets
  3. Standardized image naming:

    • All repos now use temporal as the image name (no more temporal-cli for forks)
  4. Proper Docker Hub handling:

    • Correctly handles Docker Hub's no-registry-prefix format
    • Tags: temporalio/temporal:v1.2.3 (not docker.io/temporalio/temporal:v1.2.3)

Default Behavior

For temporalio/cli (upstream):

  • Registry: docker.io (auto-detected)
  • Namespace: temporalio
  • Image: temporal
  • Result: temporalio/temporal:v1.2.3

For chaptersix/temporal-cli (fork):

  • Registry: ghcr.io (auto-detected)
  • Namespace: chaptersix
  • Image: temporal
  • Result: ghcr.io/chaptersix/temporal:v1.2.3

Benefits

  • ✅ Zero configuration needed for standard use cases
  • ✅ Fully configurable for custom registries
  • ✅ Backward compatible with temporalio's existing setup
  • ✅ Works out-of-the-box for all forks
  • ✅ Ready to PR back to upstream

Testing

After merging, create a new release to verify images publish correctly to ghcr.io/chaptersix/temporal.

This change makes Docker image publishing fully configurable while maintaining
backward compatibility with both temporalio (Docker Hub) and forks (GHCR).

Changes:
- Add workflow inputs: registry, registry_namespace, and image_name
- Smart defaults: temporalio uses Docker Hub, forks use GHCR
- Conditional authentication for multiple registries
- Standardize image name to "temporal" everywhere
- Proper handling of Docker Hub's no-prefix format

Workflow inputs (all optional with smart defaults):
- registry: Container registry (docker.io, ghcr.io, etc.)
- registry_namespace: Organization/user (defaults to repository_owner)
- image_name: Image name (defaults to "temporal")

Default behavior:
- temporalio/cli → docker.io/temporalio/temporal
- forks → ghcr.io/{owner}/temporal

This design is PR-able to upstream while working for forks out of the box.
@chaptersix chaptersix merged commit ddbb2e2 into main Nov 21, 2025
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant