Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

tcitry/push-to-master

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

push-to-master

what is it

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

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

main.workflow example

workflow "push to master" {
  on = "push"
  resolves = ["push action"]
}

action "Filters for GitHub Actions" {
  uses = "actions/bin/filter@b2bea0749eed6beb495a8fa194c071847af60ea1"
  args = "branch <pushed branch>"
}

action "push action" {
  uses = "tcitry/push-to-master/@v1.0"
  needs = "Filters for GitHub Actions"
  secrets = ["GITHUB_TOKEN"]
  args = "<dist branch>"
}

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.