fix(ci): resolve upload-artifact path via github.workspace context#29
Conversation
In a reusable workflow the runner process CWD is not guaranteed to be
$GITHUB_WORKSPACE, so the relative glob sbom-*.json resolves to the
wrong directory (confirmed failing in run 24256519203 even with the
file confirmed present at $GITHUB_WORKSPACE/sbom-runtime.json).
upload-artifact@v4 evaluates ${{ github.workspace }} as a workflow
context expression before the glob resolver runs, so the path
correctly expands to the workspace root regardless of the process CWD.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 20 minutes and 44 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ 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 |
Summary
In a reusable (
workflow_call) workflow the runner process CWD is not guaranteed to be$GITHUB_WORKSPACE. The relative globsbom-*.jsontherefore resolves to the wrong directory, confirmed failing in run 24256519203 even with the file present at$GITHUB_WORKSPACE/sbom-runtime.json.Using
${{ github.workspace }}/sbom-*.jsongivesupload-artifact@v4the workspace root as a context expression evaluated before the glob resolver runs, so the path is correct regardless of process CWD.Diagnosis path
${{ github.workspace }}/sbom-*.jsonwith v4.6.2${{ github.workspace }}/sbom-*.jsonwith v4.5.0sbom-*.json(relative) with v4.5.0${{ github.workspace }}/sbom-*.jsonwith v4.5.0The combination of v4.5.0 +
${{ github.workspace }}context path has not yet had a clean test run.Testing
scan-runtimeandlicense-compliancejobs receive the artifact🤖 Generated with Claude Code