Skip to content

ci: download rebuilt dist/ artifact outside the checkout workspace#445

Merged
bdehamer merged 1 commit into
mainfrom
bdehamer/fix-dist-artifact-path
Jul 10, 2026
Merged

ci: download rebuilt dist/ artifact outside the checkout workspace#445
bdehamer merged 1 commit into
mainfrom
bdehamer/fix-dist-artifact-path

Conversation

@bdehamer

Copy link
Copy Markdown
Collaborator

What

Fixes the Commit dist workflow, which failed on the first real run against a Dependabot PR (run 29120113703, for #435) with:

mv: cannot stat 'incoming/dist': No such file or directory

Root cause

commit-dist.yml downloaded the rebuilt dist/ artifact into incoming/ inside the checkout workspace. The subsequent actions/checkout step runs git clean -ffdx by default, which deleted the untracked incoming/ 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_WORKSPACE and is therefore untouched by checkout's clean. Updated the download path and the two steps that reference it.

Testing

To re-verify after merge, trigger a fresh Rebuild dist run on a Dependabot production-bump PR (e.g. re-run or push to #435); the resulting workflow_run will exercise the corrected commit-dist.yml.

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]>
Copilot AI review requested due to automatic review settings July 10, 2026 20:07
@bdehamer
bdehamer requested a review from a team as a code owner July 10, 2026 20:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-dist artifact into ${{ runner.temp }}/incoming instead of incoming/ 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

@bdehamer
bdehamer merged commit a5ce33e into main Jul 10, 2026
7 checks passed
@bdehamer
bdehamer deleted the bdehamer/fix-dist-artifact-path branch July 10, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants