Default Branch should be triggered branch not Master
See original GitHub issueThe reason for this is because i was having hair pulling troubles trying to figure out how to get this action to push to the branch that triggered the script. Due to the complexity of github actions.
In addition, this Action name’s “intent” is just push, which by default I would expect it to only push on the triggered branch, not merge to master.
Either it should by default push to trigger branch or give the example to do so in the readme file.
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:40
- Comments:10 (2 by maintainers)
Top Results From Across the Web
The new Git default branch name - GitLab
Default branch name changes for GitLab.com and self-managed users: When creating a new project in GitLab, the default branch name will change ...
Read more >github default branch is main but not master - Stack Overflow
You can pick whatever default branch you like: docs.github.com/en/free-pro-team@latest/github/… – jonrsharpe · Thanks. · FYI: The change from ...
Read more >Branches in a Nutshell - Git SCM
A branch in Git is simply a lightweight movable pointer to one of these commits. The default branch name in Git is master...
Read more >The default branch for newly-created repositories is now main
The default branch name for new repositories is now main . To set a different default: ... Users, organizations, and enterprises that previously ......
Read more >Change the default branch - Azure Repos | Microsoft Learn
A Git repository can only have one default branch. However, for a while, you can set up ad-hoc mirroring between your old default...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@koppor
You can use the
ref
instead ofhead_ref
for push events. https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-contextI set our CI to use this plugin to push only tags. So I didn’t set branch and I thought that it will push only tags. But a very weird thing happened. Every time our workflow finished a deploy from any branch it ‘force’ pushes the current branch to the master. 😲
Maybe I did not read the documentation properly but I still think that if I don’t specify the branch, it should push to the current or doesn’t push branch at all.