From 59623f6a4646337165274a65adf763e5dee745c8 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 11:56:03 +0200 Subject: [PATCH] Add Workflwo --- .github/workflows/push-to-gitea.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/push-to-gitea.yml diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml new file mode 100644 index 0000000..0accba6 --- /dev/null +++ b/.github/workflows/push-to-gitea.yml @@ -0,0 +1,24 @@ +name: Sync to Gitea + +on: + push: + branches: + - main # or whatever branch you want to sync + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + - name: Checkout source repo + uses: actions/checkout@v4 + + - name: Push to Gitea + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + git remote add gitea https://$GITEA_USER:$GITEA_TOKEN@gitea.example.com/user/repo.git + git push gitea HEAD:main --force + env: + GITEA_USER: ${{ secrets.GITEA_USER }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}