项目作者: tcitry

项目描述 :
Push your code to master or other branch
高级语言: Dockerfile
项目地址: git://github.com/tcitry/push-to-master.git
创建时间: 2019-03-26T14:59:06Z
项目社区:https://github.com/tcitry/push-to-master

开源协议:MIT License

下载


push-to-master

what is it

It seems like “pull request” but actually is “git push -f origin dist-branch”.

  1. rm -rf .git
  2. git init
  3. git add .
  4. git commit -m 'Auto Pushed From Action'
  5. git push --force master:<dist branch>

main.workflow example

  1. workflow "push to master" {
  2. on = "push"
  3. resolves = ["push action"]
  4. }
  5. action "Filters for GitHub Actions" {
  6. uses = "actions/bin/filter@b2bea0749eed6beb495a8fa194c071847af60ea1"
  7. args = "branch <pushed branch>"
  8. }
  9. action "push action" {
  10. uses = "tcitry/push-to-master/@v1.0"
  11. needs = "Filters for GitHub Actions"
  12. secrets = ["GITHUB_TOKEN"]
  13. args = "<dist branch>"
  14. }

NOTE: If dist branch is empty will push to master!

The action need your GITHUB_TOKEN, or you can custom a secrets ENV TOKEN to fill with your token.