codeberg_mirror.yml 728 B

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