Create mirror.yml
This commit is contained in:
25
.github/workflows/mirror.yml
vendored
Normal file
25
.github/workflows/mirror.yml
vendored
Normal 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
|
||||||
Reference in New Issue
Block a user