-
-
Notifications
You must be signed in to change notification settings - Fork 422
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 changelog action workflow #1878
Conversation
Before a pull request is accepted, it must meet the following criteria:
|
Codecov Report
@@ Coverage Diff @@
## master #1878 +/- ##
==========================================
+ Coverage 62.24% 62.47% +0.23%
==========================================
Files 67 68 +1
Lines 6830 7134 +304
==========================================
+ Hits 4251 4457 +206
- Misses 2579 2677 +98
Continue to review full report at Codecov.
|
git tag -d ${{ github.ref_name }} | ||
git tag -a ${{ github.ref_name }} -m "$GIT_TAG_MESSAGE" | ||
git checkout master | ||
git push --tags --force |
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.
Why is a force push needed?
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.
The tag that we intend to rewrite will exist in the remote. The lack of a force push will give the error already exists
. So to overwrite the tag we need a force push
This issue is related to the @tardis-bot token permissions and the fact our |
@epassaro I am not sure about the permissions that the tardis bot has. But I don't think that it is alone responsible. I have made a testing branch in my fork to test this workflow. There I gave the default Upon enquire into the issue, I figured that the issue occurs due to the nature of how the checkout action works. When we consider a tag based trigger, the checkout action will perform the So to deal with this, I have used this approach to modify and force push the tag to the repository. If you think we need to append to a branch as usual, then we need to figure out a different way to automatically trigger the workflow. |
Also I have updates the PR to use better git tag commands. I had used an unnecessary complicated approach before to deal with the tags due to the lack of good documentation on updating tags. |
@epassaro (our infrastructure coordinator) can you review it and bring it to merge or close? |
Hi @rohithvarma3000, thanks for your PR. We're going to change the way we push changes from CI/CD to the repository and soon this action would not be needed anymore. |
Modify the git flow in the changelog action workflow
Description
This PR aims to solve the detached head issue raised by github actions when the tag triggers the workflow. The action first deletes the tag in the runner. Then the tag is recreated to point to the new commit. The change is then force pushed to origin.
Motivation and context
Fix for issue #1871
How has this been tested?
Tested by pushing tags to my fork
Type of change
Checklist