Skip to content

Commit e536d35

Browse files
authored
fix(ci): fix docker image publishing and worker builds (#3013)
## Summary - **Fix Docker publish automation**: The `v.docker.*` tags pushed by the release workflow using `GITHUB_TOKEN` don't trigger the publish workflow (GitHub Actions limitation to prevent infinite loops). Added a `workflow_call` to `publish.yml` directly from the release job so Docker images are built automatically after npm publish. Tags are still pushed for reference. - **Fix worker Containerfiles**: The coordinator, docker-provider, and kubernetes-provider builds have been failing since the superjson vendoring change in `@trigger.dev/core` (#2949). The Containerfiles now run `bundle-vendor` before `build:bundle` to generate the vendor files that esbuild needs. ### Context - Docker images on GHCR have been stuck at v4.3.0 — v4.3.1, v4.3.2, v4.3.3 tags existed on GitHub but never triggered publish runs - The worker builds (publish-worker) have been failing on every push to main since Jan 30 ## Test plan - [x] Verified kubernetes-provider Containerfile builds locally with the fix - [x] Manually dispatched publish workflow for v4.3.1 — all jobs succeeded <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/triggerdotdev/trigger.dev/pull/3013" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
1 parent b96a0b7 commit e536d35

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,24 @@ jobs:
122122
package_version=$(echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -r '.[0].version')
123123
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
124124
125-
# this triggers the publish workflow for the docker images
126125
- name: Create and push Docker tag
127126
if: steps.changesets.outputs.published == 'true'
128127
run: |
129128
set -e
130129
git tag "v.docker.${{ steps.get_version.outputs.package_version }}"
131130
git push origin "v.docker.${{ steps.get_version.outputs.package_version }}"
132131
132+
# Trigger Docker builds directly via workflow_call since tags pushed with
133+
# GITHUB_TOKEN don't trigger other workflows (GitHub Actions limitation).
134+
publish-docker:
135+
name: 🐳 Publish Docker images
136+
needs: release
137+
if: needs.release.outputs.published == 'true'
138+
uses: ./.github/workflows/publish.yml
139+
secrets: inherit
140+
with:
141+
image_tag: v${{ needs.release.outputs.published_package_version }}
142+
133143
# The prerelease job needs to be on the same workflow file due to a limitation related to how npm verifies OIDC claims.
134144
prerelease:
135145
name: 🧪 Prerelease

apps/coordinator/Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ COPY --from=pruner --chown=node:node /app/out/full/ .
3535
COPY --from=dev-deps --chown=node:node /app/ .
3636
COPY --chown=node:node turbo.json turbo.json
3737

38-
RUN pnpm run -r --filter coordinator build:bundle
38+
RUN pnpm run -r --filter @trigger.dev/core bundle-vendor && pnpm run -r --filter coordinator build:bundle
3939

4040
FROM alpine AS cri-tools
4141

apps/docker-provider/Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ COPY --from=pruner --chown=node:node /app/out/full/ .
3131
COPY --from=dev-deps --chown=node:node /app/ .
3232
COPY --chown=node:node turbo.json turbo.json
3333

34-
RUN pnpm run -r --filter docker-provider build:bundle
34+
RUN pnpm run -r --filter @trigger.dev/core bundle-vendor && pnpm run -r --filter docker-provider build:bundle
3535

3636
FROM base AS runner
3737

apps/kubernetes-provider/Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ COPY --from=pruner --chown=node:node /app/out/full/ .
3131
COPY --from=dev-deps --chown=node:node /app/ .
3232
COPY --chown=node:node turbo.json turbo.json
3333

34-
RUN pnpm run -r --filter kubernetes-provider build:bundle
34+
RUN pnpm run -r --filter @trigger.dev/core bundle-vendor && pnpm run -r --filter kubernetes-provider build:bundle
3535

3636
FROM base AS runner
3737

0 commit comments

Comments
 (0)