ci: Only upload artifacts in the XRPLF/rippled repository - #6523
Conversation
There was a problem hiding this comment.
Pull request overview
Updates CI workflow guards so artifact- and package-upload steps only run when the workflow is executing in the canonical XRPLF/rippled repository, avoiding failures in downstream clones/forks that lack the required credentials or infrastructure.
Changes:
- Switch multiple workflow
if:conditions fromgithub.repository_owner == 'XRPLF'togithub.repository == 'XRPLF/rippled'. - Restrict Conan remote login/upload and recipe-upload jobs to only execute in
XRPLF/rippled. - Restrict binary artifact upload and Codecov upload to only execute in
XRPLF/rippled.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/upload-conan-deps.yml | Restricts Conan remote login/upload steps to the XRPLF/rippled repo. |
| .github/workflows/reusable-build-test-config.yml | Restricts Linux binary artifact upload and Codecov upload to the XRPLF/rippled repo. |
| .github/workflows/on-trigger.yml | Restricts the develop-branch recipe upload job to the XRPLF/rippled repo. |
| .github/workflows/on-tag.yml | Restricts tag-triggered recipe upload job to the XRPLF/rippled repo. |
| .github/workflows/on-pr.yml | Restricts PR-based recipe upload job to the XRPLF/rippled repo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Only run when committing to a PR that targets a release branch in the | ||
| # XRPLF repository. | ||
| if: ${{ github.repository_owner == 'XRPLF' && needs.should-run.outputs.go == 'true' && startsWith(github.ref, 'refs/heads/release') }} | ||
| if: ${{ github.repository == 'XRPLF/rippled' && needs.should-run.outputs.go == 'true' && startsWith(github.ref, 'refs/heads/release') }} |
There was a problem hiding this comment.
In a pull_request workflow, github.ref is typically refs/pull/<n>/merge (not the target branch). This startsWith(github.ref, 'refs/heads/release') check will never be true for PRs targeting release branches, so upload-recipe will be skipped. Use the PR base branch context instead (e.g., github.base_ref / github.event.pull_request.base.ref) and keep merge_group behavior in mind if it should also upload for merge queue runs. Also, the preceding comment says “XRPLF repository” but the condition now targets XRPLF/rippled; updating the comment would keep the intent clear.
There was a problem hiding this comment.
This will be fixed in a separate PR.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #6523 +/- ##
=========================================
- Coverage 79.8% 79.8% -0.0%
=========================================
Files 862 862
Lines 67881 67881
Branches 7555 7558 +3
=========================================
- Hits 54199 54185 -14
- Misses 13682 13696 +14 🚀 New features to boost your workflow:
|
This change will only attempt to upload artifacts for CI runs performed in the XRPLF/rippled repository.
This change will only attempt to upload artifacts for CI runs performed in the XRPLF/rippled repository.
This change will only attempt to upload artifacts for CI runs performed in the XRPLF/rippled repository.
High Level Overview of Change
This change will only attempt to upload artifacts for CI runs performed in the XRPLF/rippled repository.
Context of Change
When we want to try out something new in a separate repository based on the rippled repository, the CI pipelines will fail when they try to upload the artifacts. We should only attempt to upload artifacts in the rippled repository.
Type of Change
.gitignore, formatting, dropping support for older tooling)