Create mirror.yml

This commit is contained in:
Hobbabobba
2025-09-17 20:51:46 +02:00
committed by GitHub
parent 7e76bacc85
commit 0cbe13a9a5

25
.github/workflows/mirror.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Mirror to Gitea
on:
push:
branches:
- main # oder alle Branches weglassen, um alle Pushes zu spiegeln
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- name: Checkout GitHub repo
run: |
git clone --bare https://github.com/Hobbabobba/keyserver.git repo
- name: Push all branches and tags to Gitea
env:
GITEA_USER: ${{ secrets.GITEA_USER }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
cd repo
git remote add gitea https://${GITEA_USER}:${GITEA_TOKEN}@git.nauheimtech.de/StefanMewes/keyserver.git
# Push alle Branches
git push gitea --all --force
# Push alle Tags
git push gitea --tags --force