From 15230f3e404d8d1b1a01e055ed6841f6154911d6 Mon Sep 17 00:00:00 2001 From: Alexander Renz Date: Sat, 13 Dec 2025 14:45:47 +0100 Subject: [PATCH] fix(ci): use HTTPS token for GitHub mirror --- .gitea/workflows/ci.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 447e4fd..2ca1d28 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -200,16 +200,13 @@ jobs: needs: [test, lint] if: github.event_name == 'push' && github.ref == 'refs/heads/main' && vars.MIRROR_ENABLED != 'false' steps: - - name: Setup SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.GITHUB_MIRROR_SSH_KEY }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - ssh-keyscan github.com >> ~/.ssh/known_hosts + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 - - name: Clone and mirror + - name: Push to GitHub run: | - git clone --mirror ${{ env.GITEA_URL }}/${GITHUB_REPOSITORY}.git repo.git - cd repo.git - git remote add github git@github.com:PlusOne/hmac-file-server.git - git push --mirror github || (git push --force --all github && git push --force --tags github) + git remote add github https://x-access-token:${{ secrets.GITHUB_MIRROR_TOKEN }}@github.com/PlusOne/hmac-file-server.git + git push --force --all github + git push --force --tags github