-
Notifications
You must be signed in to change notification settings - Fork 618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: neard-release pipeline #10521
Fix: neard-release pipeline #10521
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #10521 +/- ##
==========================================
- Coverage 72.01% 71.99% -0.03%
==========================================
Files 720 720
Lines 146476 146476
Branches 146476 146476
==========================================
- Hits 105486 105456 -30
- Misses 36133 36158 +25
- Partials 4857 4862 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -39,6 +39,8 @@ jobs: | |||
- name: Checkout nearcore repository | |||
if: ${{ github.event_name != 'workflow_dispatch'}} | |||
uses: actions/checkout@v4 | |||
with: | |||
fetch-depth: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documented in the readme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now I know :)
#10495 was meant to fix the builds triggered by release events. With actions/checkout GHA action only a single commit is fetched by default and thus missing branch match. To fetch all history for all branches and tags, setting fetch-depth to 0 for both binary and docker image release jobs. This was [tested](https://github.com/near/andrei-playground/actions/runs/7696882172/job/20972653224) on a private repo. <img width="676" alt="Screenshot 2024-01-29 at 13 42 09" src="https://github.com/near/nearcore/assets/122784628/941c1cd8-285e-4853-a9e7-a6ea6885c838">
In #10521 I made checkout process to fetch all nearcore branches. This instead messed with master branch builds version because these are fetching latest annotated tag: ``` ➜ nearcore git:(master) git "describe" "--always" "--dirty=-modified" "--tags" "--match=[0-9]*" 1.36.1-653-g2b01868d4 ``` To avoid this, we will be fetching with depth 1(default fetch-depth) when workflow is triggered by master branch push events. ``` ➜ nearcore git:(master) git "describe" "--always" "--dirty=-modified" "--tags" "--match=[0-9]*" dfa392b ```
#10495 was meant to fix the builds triggered by release events.
With actions/checkout GHA action only a single commit is fetched by default and thus missing branch match.
To fetch all history for all branches and tags, setting fetch-depth to 0 for both binary and docker image release jobs.
This was tested on a private repo.