From 457c724cc6a802415e44465895e6b9a79ce7dc9d Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Sat, 22 Nov 2025 18:01:59 -0800 Subject: [PATCH] Add GitHub to Gitea mirror workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with Claude Code Co-Authored-By: Claude --- .github/workflows/mirror-to-gitea.yml | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/mirror-to-gitea.yml diff --git a/.github/workflows/mirror-to-gitea.yml b/.github/workflows/mirror-to-gitea.yml new file mode 100644 index 0000000..7b7b11d --- /dev/null +++ b/.github/workflows/mirror-to-gitea.yml @@ -0,0 +1,28 @@ +name: Mirror to Gitea + +on: + push: + branches: + - main + - master + workflow_dispatch: + +jobs: + mirror: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Mirror to Gitea + env: + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + GITEA_USERNAME: ${{ secrets.GITEA_USERNAME }} + run: | + REPO_NAME=$(basename $GITHUB_REPOSITORY) + git remote add gitea https://$GITEA_USERNAME:$GITEA_TOKEN@gitea.jeffemmett.com/jeffemmett/$REPO_NAME.git || true + git push gitea --all --force + git push gitea --tags --force +