ci: Fix rules used to determine when to upload Conan recipes - #6524
Conversation
There was a problem hiding this comment.
Pull request overview
Updates GitHub Actions workflow gating and branch-detection logic to ensure Conan uploads/artifacts only run in the canonical XRPLF/rippled repository and to make recipe-upload branch selection more robust across event types.
Changes:
- Replace
github.repository_owner == 'XRPLF'checks withgithub.repository == 'XRPLF/rippled'for upload steps (Conan, artifacts, coverage). - Add a normalized
BASE_REFto the reusable Conan recipe upload workflow and use it fordevelop/release*recipe selection. - Fix PR recipe-upload triggering to key off the PR base branch name (release branches).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/upload-conan-deps.yml | Restricts Conan remote login/upload steps to only run in XRPLF/rippled. |
| .github/workflows/reusable-upload-recipe.yml | Introduces BASE_REF normalization for branch-based recipe uploads. |
| .github/workflows/reusable-build-test-config.yml | Restricts artifact and Codecov upload steps to only run in XRPLF/rippled. |
| .github/workflows/on-trigger.yml | Restricts develop-branch recipe upload job to only run in XRPLF/rippled. |
| .github/workflows/on-tag.yml | Restricts tag-triggered recipe upload job to only run in XRPLF/rippled. |
| .github/workflows/on-pr.yml | Updates release-branch PR detection for recipe upload gating. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #6524 +/- ##
=========================================
- Coverage 79.8% 79.8% -0.0%
=========================================
Files 862 862
Lines 67881 67881
Branches 7549 7554 +5
=========================================
- Hits 54194 54191 -3
- Misses 13687 13690 +3 🚀 New features to boost your workflow:
|
mathbunnyru
left a comment
There was a problem hiding this comment.
Copilot might have a valid point here, please take a look
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
) The refs as previously used pointed to the source branch, not the target branch. However, determining the target branch is different depending on the GitHub event. The pull request logic was incorrect and needed to be fixed, and the logic inside the workflow could be simplified. Both modifications have been made in this commit.
High Level Overview of Change
This change fixes how rules are used to determine when to upload Conan recipes.
Context of Change
The refs as previously used pointed to the source branch, not the target branch. However, determining the target branch is different depending on the GitHub event. For pull request events, the base ref in
github.pull_request.base.refis a short ref (e.g.develop), while for pushes, the ref ingithub.refis a full ref (e.g.refs/heads/develop). The pull request logic was therefore incorrect and needed to be fixed.Moreover, after a closer inspection of when the upload workflow is called, i.e. pushes => develop, pull requests => release candidate, tag => release, the logic inside the workflow could be simplified.
Type of Change
.gitignore, formatting, dropping support for older tooling)