forked from manubot/rootstock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify CI to allow for main default branch
Goal is to make CI scripts work with a default branch of main or master. notes: `git symbolic-ref refs/remotes/origin/HEAD` worked locally but not on GitHub actions. references: - actions/checkout#283 (comment) - https://github.com/thoughtbot/dotfiles/blob/2a59c1890f81bffc1db79cae4482ce2b706b0f79/bin/git-up - https://github.com/actions/checkout/pull/284/files - jhauberg/gitdoctor#3 (comment)
- Loading branch information
Showing
4 changed files
with
19 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
667d170
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.
I left this comment, did another Google search and found your solution using grep --perl-regexp.
Thank you for open-sourcing this project!
667d170
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.
A more readable approach I found on that same page was:
git remote show origin | awk '/HEAD branch/ {print $NF}'
and no color info comes over (which might be preferable I think.)667d170
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.
@rainabba nice! For our use, we could probably update to using the
github.event.repository.default_branch
actions context: