chore(ci): add manual trigger to the image publishing workflow#2790
chore(ci): add manual trigger to the image publishing workflow#2790
Conversation
Useful to retry failures manually.
|
WalkthroughThis pull request modifies Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes This change introduces a new event trigger to a GitHub Actions workflow file. The review requires verifying that the Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/publish.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (21)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
- GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
- GitHub Check: typecheck / typecheck
- GitHub Check: Analyze (javascript-typescript)
| name: 🚀 Publish Trigger.dev Docker | ||
|
|
||
| on: | ||
| repository_dispatch: |
There was a problem hiding this comment.
Replace repository_dispatch with workflow_dispatch to support manual triggering.
When triggered via repository_dispatch, data is available through github.event.client_payload, not the inputs context. Since jobs at lines 64, 71, 78 reference inputs.image_tag, the workflow will fail when triggered via repository_dispatch because that context is unavailable.
Use workflow_dispatch instead, which provides a 'Run workflow' button on the Actions tab for manual triggering and supports the inputs context. Apply this diff:
on:
- repository_dispatch:
+ workflow_dispatch:
+ inputs:
+ image_tag:
+ description: The image tag to publish
+ required: true
+ type: string
workflow_call:
inputs:
image_tag:If API-triggered runs are specifically required, add repository_dispatch with conditional input handling:
on:
workflow_dispatch:
inputs:
image_tag:
description: The image tag to publish
required: true
type: string
repository_dispatch:
types: [publish]
workflow_call:
inputs:
image_tag:
description: The image tag to publish
required: true
type: stringThen reference the tag conditionally: with: image_tag: ${{ inputs.image_tag || github.event.client_payload.image_tag }}
Verify whether API triggering is actually required, as the PR description only mentions "retry failures manually."
🤖 Prompt for AI Agents
.github/workflows/publish.yml around line 4: the workflow is using
repository_dispatch which does not populate the inputs context (inputs.image_tag
is referenced later), causing failures when manually triggered; change the
trigger to workflow_dispatch and define the image_tag input so the inputs
context is available, or if API triggers must be supported, add both
workflow_dispatch (with inputs) and repository_dispatch plus conditional usage
of either inputs.image_tag or github.event.client_payload.image_tag in the job
step (e.g., set with: image_tag: inputs.image_tag ||
github.event.client_payload.image_tag).
…lish.yml Mixed up the trigger in #2790
Useful to retry failures manually.