From 791b2e499bf12fa7b3114312a3d41a671eb0cd66 Mon Sep 17 00:00:00 2001 From: monsieurleberre Date: Fri, 19 Jun 2026 09:47:38 +0100 Subject: [PATCH 1/2] fix(csharp-ci): pin Record-shard-result to workspace so non-root working-directory callers upload artifacts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The v2.2.0 badge feature added a `Record shard result` run-step and an `Upload shard result` upload-artifact step. `Record shard result` had no `working-directory:` override, so it inherited the job's `defaults.run.working-directory` (`inputs.working-directory`). For a caller passing `working-directory: csharp` it wrote `csharp/ci-result/.txt`. `actions/upload-artifact` ignores `defaults.run.working-directory` and resolves its `path:` relative to the repo root, so `Upload shard result` looked for `./ci-result/.txt`, which did not exist, and failed with `No files were found with the provided path: ci-result/.txt` under `if-no-files-found: error`. This broke every caller with a non-root `working-directory` (observed in peacefulstudio/canton-localnet-internal, PR #102: steps 1-19 including coverage at 95% pass; only the shard upload fails). Pin `Record shard result` to `working-directory: ${{ github.workspace }}` so it writes `ci-result/.txt` at the repo root, matching where `upload-artifact` reads — mirroring how the adjacent coverage Extract/Prepend/Write steps are already pinned. The coverage upload pair and the pack `Compute artifact path`/`Upload nupkg artifact` pair were audited and already resolve their paths at the repo root, so no other site needed changing. --- .github/workflows/csharp-ci.yaml | 1 + CHANGELOG.md | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/csharp-ci.yaml b/.github/workflows/csharp-ci.yaml index b7ad013..afb3d60 100644 --- a/.github/workflows/csharp-ci.yaml +++ b/.github/workflows/csharp-ci.yaml @@ -399,6 +399,7 @@ jobs: - name: Record shard result if: ${{ !cancelled() }} + working-directory: ${{ github.workspace }} env: SHARD_NAME: ${{ matrix.name }} SHARD_STATUS: ${{ job.status }} diff --git a/CHANGELOG.md b/CHANGELOG.md index d7296ef..38fa1bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Fix `csharp-ci.yaml` failing the `Upload shard result` step for callers that pass a non-root `working-directory` (e.g. `working-directory: csharp`). The `Record shard result` step inherited the job's `defaults.run.working-directory` and wrote `ci-result/.txt` under that subdirectory, but `actions/upload-artifact` ignores `defaults.run.working-directory` and resolves its `path:` relative to the repo root, so the upload failed with `No files were found with the provided path: ci-result/.txt` (`if-no-files-found: error`). The `Record shard result` step is now pinned to `working-directory: ${{ github.workspace }}` so it writes at the repo root, matching where `upload-artifact` reads — mirroring how the adjacent coverage steps are already pinned. Reported by `peacefulstudio/canton-localnet-internal`. (#28) + ## [2.3.0] - 2026-06-18 ### Added From 7900aa0fd97047d76ac1a2b2b02f2410cf3599a2 Mon Sep 17 00:00:00 2001 From: monsieurleberre Date: Fri, 19 Jun 2026 11:01:04 +0100 Subject: [PATCH 2/2] docs(changelog): cut 2.3.1 section for shard-result fix --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38fa1bf..82e402b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.3.1] - 2026-06-19 + ### Fixed - Fix `csharp-ci.yaml` failing the `Upload shard result` step for callers that pass a non-root `working-directory` (e.g. `working-directory: csharp`). The `Record shard result` step inherited the job's `defaults.run.working-directory` and wrote `ci-result/.txt` under that subdirectory, but `actions/upload-artifact` ignores `defaults.run.working-directory` and resolves its `path:` relative to the repo root, so the upload failed with `No files were found with the provided path: ci-result/.txt` (`if-no-files-found: error`). The `Record shard result` step is now pinned to `working-directory: ${{ github.workspace }}` so it writes at the repo root, matching where `upload-artifact` reads — mirroring how the adjacent coverage steps are already pinned. Reported by `peacefulstudio/canton-localnet-internal`. (#28) @@ -105,7 +107,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `csharp-ci.yaml` — .NET build / test / coverage / pack. - `terraform-ci.yaml` — Terraform fmt / validate / test. -[Unreleased]: https://github.com/peacefulstudio/github-actions/compare/v2.3.0...HEAD +[Unreleased]: https://github.com/peacefulstudio/github-actions/compare/v2.3.1...HEAD +[2.3.1]: https://github.com/peacefulstudio/github-actions/compare/v2.3.0...v2.3.1 [2.3.0]: https://github.com/peacefulstudio/github-actions/compare/v2.2.0...v2.3.0 [2.2.0]: https://github.com/peacefulstudio/github-actions/compare/v2.1.0...v2.2.0 [2.1.0]: https://github.com/peacefulstudio/github-actions/compare/v2.0.0...v2.1.0