codeberg_mirror.yml 682 B

12345678910111213141516171819202122232425
  1. name: Mirror to Codeberg
  2. on:
  3. push:
  4. branches: [ main ]
  5. delete:
  6. workflow_dispatch:
  7. jobs:
  8. mirror:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Checkout
  12. uses: actions/checkout@v6
  13. with:
  14. fetch-depth: 0
  15. - name: Mirror to Codeberg
  16. env:
  17. CODEBERG_USERNAME: ${{ secrets.CODEBERG_USERNAME }}
  18. CODEBERG_TOKEN: ${{ secrets.CODEBERG_TOKEN }}
  19. run: |
  20. git remote add codeberg https://${{ secrets.CODEBERG_USERNAME }}:${{ secrets.CODEBERG_TOKEN }}@codeberg.org/miniflux/v2.git
  21. git push --force --prune codeberg \
  22. "refs/heads/*:refs/heads/*" \
  23. "refs/tags/*:refs/tags/*"