Initial commit
Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
commit
7c7c5cff7a
1 changed files with 39 additions and 0 deletions
39
action.yaml
Normal file
39
action.yaml
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
name: "Rebase repo to mirrored upstream"
|
||||||
|
description: "Rebase repo to mirrored upstream"
|
||||||
|
inputs:
|
||||||
|
name:
|
||||||
|
description: "Repository name"
|
||||||
|
required: true
|
||||||
|
branch:
|
||||||
|
description: "Upstream rebase target branch"
|
||||||
|
required: true
|
||||||
|
secret:
|
||||||
|
description: "Repo push token"
|
||||||
|
required: true
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
token: ${{ inputs.secret }}
|
||||||
|
|
||||||
|
- name: Set git user
|
||||||
|
shell: sh
|
||||||
|
run: >
|
||||||
|
git config --global user.email "bot@mail.nekocwd.duckdns.org" &&
|
||||||
|
git config --global user.name "Kitsune (Rebase Bot)"
|
||||||
|
- name: Add upstream remote
|
||||||
|
shell: sh
|
||||||
|
run: git remote add upstream ${{ github.server_url }}/mirror/${{ inputs.name }}
|
||||||
|
- name: Fetch upstream changes
|
||||||
|
shell: sh
|
||||||
|
run: git fetch upstream
|
||||||
|
- name: Rebase changes
|
||||||
|
shell: sh
|
||||||
|
run: git rebase upstream/${{ inputs.branch }}
|
||||||
|
- name: Push changes
|
||||||
|
shell: sh
|
||||||
|
run: git push --force
|
Loading…
Add table
Add a link
Reference in a new issue