Add GitHub to Gitea sync workflow

This commit is contained in:
2025-12-28 13:15:05 +07:00
parent c69cd68820
commit e3c4f59a77

27
.github/workflows/sync-to-gitea.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Sync to Gitea
on:
push:
branches:
- '**'
jobs:
sync:
runs-on: ubuntu-latest
if: |
github.repository == 'fossyy/tunnel-please' &&
!contains(github.event.head_commit.message, '[skip-gitea]')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to Gitea
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_URL: git.fossy.my.id
run: |
git remote add gitea https://${{ secrets.GITEA_USERNAME }}:${GITEA_TOKEN}@${GITEA_URL}/bagas/tunnel-please.git
git push gitea ${{ github.ref }} --force