From 606fb38c3fbd5918ede051044808633b9356c639 Mon Sep 17 00:00:00 2001 From: aleidk Date: Mon, 9 Dec 2024 13:58:26 -0300 Subject: [PATCH] build: update content-update branch on push to main --- .forgejo/workflows/build-docker-image.yaml | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.forgejo/workflows/build-docker-image.yaml b/.forgejo/workflows/build-docker-image.yaml index 52e6541..18b5da5 100644 --- a/.forgejo/workflows/build-docker-image.yaml +++ b/.forgejo/workflows/build-docker-image.yaml @@ -44,3 +44,30 @@ jobs: ssh_key: '${{ secrets.DOCKER_SWARM_SSH_KEY }}' file: 'docker-stack.yaml' name: 'personal-page' + + rebase: + runs-on: ubuntu-latest + needs: deploy + if: success() + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: main + + - name: Configure Git + run: | + git config --global user.name "robo" + git config --global user.email "robo@alecodes.page" + + - name: Rebase main into content-update + run: | + git remote add origin ${{ env.GITHUB_SERVER_URL }}/${{ env.GITHUB_REPOSITORY }}.git + git fetch origin + git rebase origin/content-update + + - name: Push changes + run: | + git push origin content-update --force-with-lease + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}