Skip to content

Commit 7645e6d

Browse files
d-csclaude
andcommitted
ci: make worker image defaults fork-aware
Mirror the webapp's fork-friendly default in the worker publish workflows: default the image namespace to ghcr.io/<owner> instead of the hardcoded ghcr.io/triggerdotdev. Upstream resolves byte-identically (owner is triggerdotdev), while forks now publish worker images to their own namespace with no IMAGE_REGISTRY config, matching publish-webapp.yml. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent e8e50a4 commit 7645e6d

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/publish-worker-v4.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ jobs:
6565
- name: 📛 Set tags to push
6666
id: set_tags
6767
run: |
68-
# Defaults to the public namespace. Set the IMAGE_REGISTRY repository
69-
# variable to publish under a different namespace (e.g. in a fork)
70-
# instead of the default packages.
68+
# Defaults to ghcr.io/<owner>, so a fork publishes to its own namespace
69+
# automatically. Set the IMAGE_REGISTRY repository variable to publish
70+
# under a different ghcr.io namespace instead.
7171
ref_without_tag=${IMAGE_REGISTRY}/${STEPS_GET_REPOSITORY_OUTPUTS_REPO}
7272
image_tags=$ref_without_tag:${STEPS_GET_TAG_OUTPUTS_TAG}
7373
7474
echo "image_tags=${image_tags}" >> "$GITHUB_OUTPUT"
7575
env:
76-
IMAGE_REGISTRY: ${{ vars.IMAGE_REGISTRY || 'ghcr.io/triggerdotdev' }}
76+
IMAGE_REGISTRY: ${{ vars.IMAGE_REGISTRY || format('ghcr.io/{0}', github.repository_owner) }}
7777
STEPS_GET_REPOSITORY_OUTPUTS_REPO: ${{ steps.get_repository.outputs.repo }}
7878
STEPS_GET_TAG_OUTPUTS_TAG: ${{ steps.get_tag.outputs.tag }}
7979
STEPS_GET_TAG_OUTPUTS_IS_SEMVER: ${{ steps.get_tag.outputs.is_semver }}

.github/workflows/publish-worker.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ jobs:
8383
docker tag infra_image "$REGISTRY/$REPOSITORY:$IMAGE_TAG"
8484
docker push "$REGISTRY/$REPOSITORY:$IMAGE_TAG"
8585
env:
86-
# Defaults to the public namespace. Set the IMAGE_REGISTRY repository
87-
# variable to publish worker images under a different namespace (e.g.
88-
# in a fork) instead of the default packages.
89-
REGISTRY: ${{ vars.IMAGE_REGISTRY || 'ghcr.io/triggerdotdev' }}
86+
# Defaults to ghcr.io/<owner>, so a fork publishes worker images to its
87+
# own namespace automatically. Set the IMAGE_REGISTRY repository variable
88+
# to publish under a different ghcr.io namespace instead.
89+
REGISTRY: ${{ vars.IMAGE_REGISTRY || format('ghcr.io/{0}', github.repository_owner) }}
9090
REPOSITORY: ${{ steps.get_repository.outputs.repo }}
9191
IMAGE_TAG: ${{ steps.get_tag.outputs.tag }}
9292

0 commit comments

Comments
 (0)