diff --git a/.github/workflows/mirror-to-gittea.yml b/.github/workflows/mirror-to-gittea.yml new file mode 100644 index 0000000..282af33 --- /dev/null +++ b/.github/workflows/mirror-to-gittea.yml @@ -0,0 +1,24 @@ +name: Mirror to Gitea + +on: + push: + 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_URL: ${{ secrets.GITEA_URL }} + GITEA_USERNAME: ${{ secrets.GITEA_USERNAME }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + run: | + git remote add gitea https://${GITEA_USERNAME}:${GITEA_TOKEN}@${GITEA_URL} + git push --quiet --mirror gitea