name: Mirror to Codeberg and Gitea on: push: branches: ["*"] workflow_dispatch: jobs: mirror: runs-on: ubuntu:22.04 steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 # all history fr - name: Mirror to Codeberg and Gitea env: CODEBERG_USERNAME: ${{ secrets.CODEBERG_USERNAME }} CODEBERG_TOKEN: ${{ secrets.CODEBERG_TOKEN }} GITEA_USERNAME: ${{ secrets.GITEA_USERNAME }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} run: | git config --global user.name "GitHub Mirror Bot" git config --global user.email "actions@github.com" git remote add codeberg https://$CODEBERG_USERNAME:$CODEBERG_TOKEN@codeberg.org/$CODEBERG_USERNAME/Poopsar.git git remote add gitea https://$GITEA_USERNAME:$GITEA_TOKEN@gitea.com/$GITEA_USERNAME/Poopsar.git git push --mirror codeberg git push --mirror gitea