ci: add GitHub Actions workflow to sync to Gitea
This commit is contained in:
parent
d9fb4c333e
commit
67d20520ac
1 changed files with 29 additions and 0 deletions
29
.github/workflows/sync-to-gitea.yml
vendored
Normal file
29
.github/workflows/sync-to-gitea.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
name: sync-to-gitea
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Push to Gitea
|
||||
env:
|
||||
GITEA_USERNAME: ${{ secrets.GITEA_USERNAME }}
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: |
|
||||
echo "Syncing to Gitea: https://ci.nxtgauge.com/Admin/${{ github.event.repository.name }}"
|
||||
echo "GitHub commit: $(git rev-parse HEAD)"
|
||||
echo "Target branch: high-performance"
|
||||
|
||||
git remote add gitea "https://${GITEA_USERNAME}:${GITEA_TOKEN}@ci.nxtgauge.com/Admin/${{ github.event.repository.name }}.git"
|
||||
git push gitea main:high-performance --force-with-lease
|
||||
|
||||
echo "Sync complete!"
|
||||
Loading…
Add table
Reference in a new issue