From 97afc4abf6148233911ed651aaf883218f2e3f6f Mon Sep 17 00:00:00 2001 From: taoria <445625470@qq.com> Date: Sat, 13 Aug 2022 00:00:43 +0800 Subject: [PATCH 1/3] Create manual.yml enable auto merge --- .github/workflows/manual.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/manual.yml diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 0000000..213609e --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,37 @@ +name: Automerge + +on: + push: + branches: + - 'work-in-progress' + + +env: + # replace "github_username" with your GitHub username + # replace "github.com/username/repo.git" with your GitHub repo path + # do NOT replace ${{secrets.GITHUB_TOKEN}}, GitHub will take care of it + MY_REPO: https://taoria:${{secrets.GITHUB_TOKEN}}@github.com/taoria/T-Node.git + + # replace "long-lived_branch_name" with your branch name + MY_BRANCH: work-in-progress + + # replace it with the path to master repo + MASTER_REPO: https://github.com/taoria/T-Node.git + + # replace "master" with your master branch name + MASTER_BRANCH: main + +jobs: + merge: + runs-on: ubuntu-latest + + steps: + - name: Merge with master + run: | + git clone ${{env.MY_REPO}} -b ${{env.MY_BRANCH}} tmp + cd tmp + git config user.name "Automerge Bot" + git config user.email "bot@example.com" + git config pull.rebase false + git pull ${{env.MASTER_REPO}} ${{env.MASTER_BRANCH}} + git push From 9786f0988bbd2fcb0192158e26a410ae085f37d7 Mon Sep 17 00:00:00 2001 From: taoria <445625470@qq.com> Date: Sat, 13 Aug 2022 00:13:09 +0800 Subject: [PATCH 2/3] Create auto merge file create another auto merge file --- .github/workflows/merge.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/merge.yml diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml new file mode 100644 index 0000000..03028a8 --- /dev/null +++ b/.github/workflows/merge.yml @@ -0,0 +1,31 @@ +# This is a basic workflow that is manually triggered + +name: Manual workflow + +# Controls when the action will run. Workflow runs when manually triggered using the UI +# or API. +on: + push: + branches: + 'work-in-progress' + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "merge" + merge: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Runs a single command using the runners shell + - name: Up merge + # You may pin to the exact commit or the version. + # uses: bambamboole/gha-upmerge@de87b212278009f9ace0ba024701890b9eb3281b + uses: bambamboole/gha-upmerge@v1.0.1 + with: + # Name of the branch to merge from + from_branch: work-in-progress + + to_branch: main + From 7944a7c093cd698a089473956f7249c8914a4ac3 Mon Sep 17 00:00:00 2001 From: taoria <445625470@qq.com> Date: Sat, 13 Aug 2022 00:18:39 +0800 Subject: [PATCH 3/3] fix but for auto merge --- .github/workflows/merge.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 03028a8..52a922d 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -5,9 +5,11 @@ name: Manual workflow # Controls when the action will run. Workflow runs when manually triggered using the UI # or API. on: + workflow_dispatch: push: branches: - 'work-in-progress' + - work-in-progress + # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: