diff --git a/.github/workflows/auto-rebase.yml b/.github/workflows/auto-rebase.yml new file mode 100644 index 0000000..b8f827d --- /dev/null +++ b/.github/workflows/auto-rebase.yml @@ -0,0 +1,29 @@ +name: Rebase arch branches to mater + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + + - name: Rebase and push + run: | + for branch in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin/arch*); do + git checkout ${branch#origin/} + git rebase master + git push --force + done \ No newline at end of file