Update .gitea/workflows/mirror.yml
This commit is contained in:
1 parent
867cc17ebf
commit
344ba12f7a
1 file changed
+14
-10
+14
-10
@@ -10,17 +10,21 @@ jobs:
|
|||||||
mirror:
|
mirror:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Push repository to GitHub
|
- name: Check out Gitea repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Push main to GitHub
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
git clone --bare \
|
|
||||||
https://oauth2:${GH_TOKEN}@github.com/tafakkur/PyNix-Website.git \
|
AUTH="$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\n')"
|
||||||
mirror.git
|
|
||||||
cd mirror.git
|
git remote add github \
|
||||||
git fetch --prune \
|
https://github.com/tafakkur/PyNix-Website.git
|
||||||
https://oauth2:${GH_TOKEN}@github.com/tafakkur/PyNix-Website.git \
|
|
||||||
'+refs/heads/*:refs/heads/*'
|
git -c http.extraheader="AUTHORIZATION: basic $AUTH" \
|
||||||
git push --mirror \
|
push --force github HEAD:refs/heads/main
|
||||||
https://oauth2:${GH_TOKEN}@github.com/tafakkur/PyNix-Website.git
|
|
||||||
Reference in new issue
Block a user