fix(ci): use relative path for upload-artifact glob#28
Conversation
upload-artifact@v4 requires a workspace-relative path. The absolute
\${{ github.workspace }}/sbom-*.json prefix introduced in #26 was
causing "No files were found" even though the file existed at that
path (confirmed by the Verify step in run 24256290551). The action
resolves globs from \$GITHUB_WORKSPACE by default, so the bare
relative glob sbom-*.json is correct.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe workflow configuration for SBOM artifact generation was updated to change the upload path from an absolute workspace reference to a relative glob pattern, affecting how files are matched during artifact upload. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
* fix(reuse): use Docker image for SPDX generation (#124) The reuse-compliance reusable workflow was exiting 1 even when `reuse lint` reported full compliance. The actual failure was in the Generate SPDX SBOM step, which ran `uv pip install --no-build 'reuse==5.0.2'`. PyPI publishes only one wheel per reuse release (5.0.2 is cp313-only, 6.2.0 is cp310-only), the runner's uv venv defaults to system CPython 3.12, no wheel matches, and `--no-build` (S8541/S8544 mitigation from PR #110) forbids the sdist fallback. Replace the uv-based install with a second invocation of fsfe/reuse-action, passing `args: spdx -o reuse-spdx.spdx`. The Docker image already has reuse installed for the correct Python ABI, so the wheel mismatch goes away, and the security posture is preserved (no host-side pip install). While here: - Gate the Upload SPDX artifact step on the SPDX step outcome so an upload-of-missing-file does not mask the real failure. - Move the `steps.reuse.outcome` shell interpolation in the Summary step into an env var, eliminating the workflow-injection antipattern. - Add SPDX step outcome to the Summary so a future SPDX failure is reported separately from REUSE compliance status. Refs: ByronWilliamsCPA/audio-processor PR #28, run 25982739523 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(reuse): distinguish SPDX skipped, upload-failed, and failed outcomes The Summary step previously gated the success message on `SPDX_OUTCOME == success` alone, so an artifact upload failure was silently presented as a successful upload, and a skipped SPDX step (triggered when REUSE lint fails with `fail-on-missing: true` and the job aborts before SPDX runs) was reported as "SPDX SBOM generation failed (outcome: skipped)", sending operators to debug a step that never ran. Address both Copilot findings on PR #125: - Add `id: upload-spdx` to the Upload SPDX artifact step and thread `UPLOAD_OUTCOME` into the Summary step's env block. - Split the SPDX status line into four explicit branches: success+uploaded (happy path), success+upload-failed (artifact is missing), skipped (no SPDX failure to investigate), and any other outcome (genuine generation failure). Also document the intentional `fail-on-missing: false` behavior with an `#ASSUME` comment: SPDX still runs against a possibly non-compliant tree because the SBOM is for transparency, not for gating, and a partial inventory beats none. Refs: ByronWilliamsCPA/.github PR #125 (review comments) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * docs(changelog): add Unreleased Fixed entry for python-reuse SPDX fix (#124) Per global CLAUDE.md, `fix:` commits must add a CHANGELOG entry. The parent commit on this branch (ed595aa, "fix(reuse): use Docker image for SPDX generation") shipped without one. Backfill the bullet here under [Unreleased] -> ### Fixed, alongside the related #110 entry, covering: the Docker-image SPDX generation switch, the wheel-ABI root cause it solved, the gated upload step, the workflow-injection mitigation (env-var pass-through), the four-way SPDX status split landed in c9f1127, and the documented `fail-on-missing: false` behavior. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Summary
upload-artifact@v4requires a workspace-relative path. The absolute${{ github.workspace }}/sbom-*.jsonintroduced in #26 caused the upload to fail even though the file existed at that exact path — confirmed by the Verify step in run 24256290551:The action resolves globs from
$GITHUB_WORKSPACEby default, so the bare relative glob is correct.Changes
path: ${{ github.workspace }}/sbom-*.json→path: sbom-*.jsonTesting
scan-runtimeandlicense-compliancejobs receive the artifact🤖 Generated with Claude Code
Summary by CodeRabbit