commit 7c7c5cff7ac4be1d6a8b21f432c39a7dbfba18dd Author: Vasiliy Doylov Date: Tue Jun 17 03:22:26 2025 +0300 Initial commit Signed-off-by: Vasiliy Doylov diff --git a/action.yaml b/action.yaml new file mode 100644 index 0000000..6f0ea25 --- /dev/null +++ b/action.yaml @@ -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