ci: download rebuilt dist/ artifact outside the checkout workspace#445
Merged
Conversation
commit-dist.yml downloaded the artifact into `incoming/` within the
workspace, but the later actions/checkout step runs `git clean -ffdx`
and deleted that untracked directory before the apply step, failing with
"mv: cannot stat 'incoming/dist'".
Download to ${{ runner.temp }}/incoming instead, which lives outside
$GITHUB_WORKSPACE and is untouched by checkout's clean.
Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the Commit dist workflow by ensuring the rebuilt dist/ artifact is downloaded outside of $GITHUB_WORKSPACE, preventing it from being deleted by the later actions/checkout clean step.
Changes:
- Download the
rebuilt-distartifact into${{ runner.temp }}/incominginstead ofincoming/in the workspace. - Update the artifact presence check and the “Apply rebuilt dist/” move/cleanup steps to use the new temp location.
- Add inline documentation explaining why the artifact must be outside the checkout workspace.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/commit-dist.yml |
Moves artifact download and subsequent references to ${{ runner.temp }} to avoid actions/checkout cleanup deleting untracked files before they’re applied. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Low
tingx2wang
approved these changes
Jul 10, 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.
What
Fixes the
Commit distworkflow, which failed on the first real run against a Dependabot PR (run 29120113703, for #435) with:Root cause
commit-dist.ymldownloaded the rebuiltdist/artifact intoincoming/inside the checkout workspace. The subsequentactions/checkoutstep runsgit clean -ffdxby default, which deleted the untrackedincoming/directory before the "Apply rebuilt dist/" step could move it. The "Check for artifact" step passed only because it ran before checkout.Fix
Download the artifact to
${{ runner.temp }}/incoming, which lives outside$GITHUB_WORKSPACEand is therefore untouched by checkout's clean. Updated the downloadpathand the two steps that reference it.Testing
To re-verify after merge, trigger a fresh
Rebuild distrun on a Dependabot production-bump PR (e.g. re-run or push to #435); the resultingworkflow_runwill exercise the correctedcommit-dist.yml.