Fix trunk-upgrade workflow: run upgrade within trunk-action lifecycle - #249
Merged
Merged
Conversation
Co-authored-by: Morgy93 <7961978+Morgy93@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix the failing GitHub Actions job 'upgrade'
Fix trunk-upgrade workflow: run Aug 24, 2026
upgrade within trunk-action lifecycle
Collaborator
|
@copilot please rebase |
Co-authored-by: Morgy93 <7961978+Morgy93@users.noreply.github.com>
Contributor
Author
Updated with latest |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to fix the scheduled “Trunk Upgrade” workflow by ensuring the Trunk binary is invoked while it still exists (i.e., within the lifecycle of trunk-io/trunk-action), avoiding failures caused by ${TRUNK_PATH} pointing to a cleaned-up temp install.
Changes:
- Moves the intended
trunk upgrade -y --include-cliexecution into thetrunk-io/trunk-actionstep configuration (instead of a later shell step). - Removes the separate shell step that invoked
"${TRUNK_PATH}" ...after the action finished.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Morgy93 <7961978+Morgy93@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Morgy93 <7961978+Morgy93@users.noreply.github.com>
Morgy93
approved these changes
Aug 24, 2026
Morgy93
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original:
The
upgradejob in theTrunk Upgradeworkflow fails because it invokes${TRUNK_PATH}in a later shell step aftertrunk-actionhas cleaned up its temp install path. This change moves the upgrade execution into the action step so the binary is still valid when called.Root cause
trunk-actionprovisions Trunk in a temporary location and cleans it up at step completion.run: "${TRUNK_PATH}" ...step can resolve to a non-existent path (No such file or directory).Workflow change
.github/workflows/trunk-upgrade.ymlto run upgrade viatrunk-actioninput arguments instead of a separate shell step.GITHUB_TOKEN) so upgrade requests remain authenticated.Resulting execution model
TRUNK_PATH.Actual:
This pull request updates the Trunk CLI installation step in the
.github/workflows/trunk-upgrade.ymlworkflow to streamline the upgrade process. The main change is moving the Trunk CLI and linters upgrade command into thepost-initparameter of thetrunk-io/trunk-action, eliminating the need for a separate upgrade step.Workflow improvements:
.github/workflows/trunk-upgrade.yml: Moved the Trunk CLI and linters upgrade command to thepost-initparameter of thetrunk-io/trunk-actionstep, and removed the separate upgrade step. This simplifies the workflow and ensures upgrades happen immediately after installation.