Add Workflwo
This commit is contained in:
parent
9dfaeccd8f
commit
59623f6a46
24
.github/workflows/push-to-gitea.yml
vendored
Normal file
24
.github/workflows/push-to-gitea.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Sync to Gitea
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main # or whatever branch you want to sync
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout source repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Push to Gitea
|
||||||
|
run: |
|
||||||
|
git config --global user.name "GitHub Actions"
|
||||||
|
git config --global user.email "actions@github.com"
|
||||||
|
git remote add gitea https://$GITEA_USER:$GITEA_TOKEN@gitea.example.com/user/repo.git
|
||||||
|
git push gitea HEAD:main --force
|
||||||
|
env:
|
||||||
|
GITEA_USER: ${{ secrets.GITEA_USER }}
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
Loading…
x
Reference in New Issue
Block a user