From 800369d7a309edd3e55582e743132a96edf42311 Mon Sep 17 00:00:00 2001 From: amass <168062547@qq.com> Date: Wed, 16 Oct 2024 01:03:56 +0800 Subject: [PATCH] fix ci. --- .gitea/workflows/build_windows.yaml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/build_windows.yaml b/.gitea/workflows/build_windows.yaml index 98b1304..1fad4b1 100644 --- a/.gitea/workflows/build_windows.yaml +++ b/.gitea/workflows/build_windows.yaml @@ -5,24 +5,15 @@ jobs: build: runs-on: [windows11] steps: - - name: Set up SSH - run: | - if (-Not (Test-Path -Path C:\Windows\system32\config\systemprofile\.ssh)) { - mkdir C:\Windows\system32\config\systemprofile\.ssh - } - echo $env:SSH_PRIVATE_KEY | Out-File -FilePath C:\Windows\system32\config\systemprofile\.ssh\id_ed25519 -Encoding ascii - icacls C:\Windows\system32\config\systemprofile\.ssh\id_ed25519 /inheritance:r /grant:r "Administrators:F" - ssh-keyscan -t ed25519 -p 22022 frp-by1.wwvvww.cn | Out-File -FilePath C:\Windows\system32\config\systemprofile\.ssh\known_hosts -Encoding ascii - env: - SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} - name: Clone repository run: | $branch = "${{ github.ref }}" -replace '^refs/heads/', '' - Write-Host "git clone --depth 1 --branch=$branch ssh://git@frp-by1.wwvvww.cn:22022/${{ env.GITEA_REPOSITORY }}.git" - git clone --depth 1 --branch=$branch ssh://git@frp-by1.wwvvww.cn:22022/${{ env.GITEA_REPOSITORY }}.git . + git clone --depth 1 --branch=$branch https://$env:GIT_USERNAME:$env:GIT_PASSWORD@amass.fun/gitea/amass/${{ env.GITEA_REPOSITORY }}.git . git checkout ${{ github.sha }} env: - GITEA_REPOSITORY: ${{ gitea.repository }} + GITEA_REPOSITORY: ${{ secrets.GITEA_REPOSITORY }} + GIT_USERNAME: ${{ secrets.GIT_USERNAME }} + GIT_PASSWORD: ${{ secrets.GIT_PASSWORD }} - name: Build and deploy run: | resources/build.ps1 build