-
Notifications
You must be signed in to change notification settings - Fork 234
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
Default Branch should be triggered branch not Master #38
Comments
or branch=${GITHUB_REF#refs/heads/} inside your action |
+1 for defaulting to current branch. I like the solution by @DavidGOrtega. Could you please update the code and the README.md accordingly? |
Out of curiosity, is there a difference between |
The former is for the The advantage of the latter approach is that the script will also work when triggered in a |
Ahh fair enough
The former works for push for me. See action script. Heres a screenshot of github action trigger that was successful in committing to master from a push onto master. |
Do you know if an empty |
I 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. |
You can use the |
As noted here ad-m/github-push-action#38, by default the push is done to the master branch. As master is locked down, the push should be done to the pull requests branch
As noted here ad-m/github-push-action#38, by default the push is done to the master branch. As master is locked down, the push should be done to the pull requests branch
* fix: when updating changlelog push back to pull request As noted here ad-m/github-push-action#38, by default the push is done to the master branch. As master is locked down, the push should be done to the pull requests branch * fix: Try by specifying ref on checkout as found in github comment ref: ad-m/github-push-action#44 (comment) * fix: add request to persist credentials when checking out * Use fetch-depth set to 0 * Move back to use bumpversion * Don't run pre commit on auto generated files * WIP: recreate auto deployment
* ✨ generate a hello world project from cookie cutter template on disk. related to #37 * 💚 make ci pass * 🔥 drop python 2 support and test * 💄 pump up the version * 💚 adapting moban v0.7.0. moremoban/moban#362 * 🔥 remove pypy3 because it is based on python 3.5.3 * 🔥 replace nose with pytest * 💚 pytest requires the package to be installed by default * 🔬 test cookie cutter, hello world project generation. #37 * ✨ auto-genenerate yehua file from cookie cutter json. #37 * ✨ first ever pass on cookiecutter-pypackage. yes, this code now can generate a cookiecutter package from cookiecutter-pypackage offline. steps: 1) git clone cookiecutter-pypackage 2) yh -c cookiecutter-pypackage 3) answer the quesetions 4) you will have what you wanted. #37 * 💚 fix unwanted yaml dependency * ✨ yes we need to use cookiecutter.extension.* * ✨ use moban update in github action * 🔨 problem solved * 🔨 use python 3.7 * 🔨 commit to feature branch * 📚 test moban update * 📚 commit changes * 📚 use default github token * 📚 how could I about this without documentationgit add .github/workflows/moban-update.yml ad-m/github-push-action#38 * 📚 tweek it work? * 📚 fix detached state. actions/checkout#6 * 📚 cannot i simply push * 📚 use auto commit * 📚 use checkout v2 * 📚 use checkout v2 * This is an auto-commit * 📚 test if auto commit would commit nothing or not * 📚 test if auto commit would commit something * 📚 test if auto commit would commit something * This is an auto-commit * ✨ add colon * This is an auto-commit * ✨ need if statement * ✨ need if statement * This is an auto-commit * ✨ generate directly from a git repo. #37 * 🔥 remove unused imports * 🔥 remove useless codes * ✨ first working POC. yh -c cookiecutter-pypackage #37 * 💚 pass all unit tests * 🔥 remove unused imports * 💚 fix coding style * ✨ minor tweak to support git url. python filesytem did the magic! #37 * 💚 test cookiecutter package as git repo * 💚 add gitfs2 as test requirements * This is an auto-commit * 💚 add gitfs2 as test requirements * This is an auto-commit * ✨ seemless integration with cookiecutter. simply replace cookiecutter with yh. the rest will follow. #37 * This is an auto-commit * 🔨 code refactoring * 🔨 code refactoring * This is an auto-commit * 🔥 remove unused imports Co-authored-by: chfw <[email protected]>
|
Hi @yasirroni, if understand your question correctly, you wanna push inside an PR scenario in the fork, correct? branch: '${{ github.event.pull_request.head.repo.default_branch }}'
repository: '${{ github.event.pull_request.head.repo.full_name }}' |
The 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.
The text was updated successfully, but these errors were encountered: