Skip to content

Commit 6631df3

Browse files
committed
fix(ci): fix Docker image publishing and worker builds
The v.docker.* tags pushed by the release workflow using GITHUB_TOKEN don't trigger the publish workflow (GitHub Actions limitation). Add a workflow_call to publish.yml directly from the release job. Also fix worker Containerfiles (coordinator, docker-provider, kubernetes-provider) that fail to build since the superjson vendoring change in @trigger.dev/core — run bundle-vendor before build:bundle.
1 parent b96a0b7 commit 6631df3

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)