diff --git a/.gitea/workflows/mirror.yaml b/.gitea/workflows/mirror.yaml new file mode 100644 index 0000000..fabbf18 --- /dev/null +++ b/.gitea/workflows/mirror.yaml @@ -0,0 +1,25 @@ + +name: Mirror to GitHub + +on: + push: + workflow_dispatch: + +jobs: + mirror: + runs-on: ubuntu-latest + steps: + - name: Mirror repository + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + run: | + set -eu + + git clone --mirror \ + https://git.pynixworld.com/PyNix/PyNix-Website.git \ + mirror.git + + git -C mirror.git \ + -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$GH_TOKEN" | base64 | tr -d '\n')" \ + push --mirror \ + https://github.com/tafakkur/PyNix-Website.git