From fd97a1f727536cd178aa7c0b1cd9edbec8b0b8e8 Mon Sep 17 00:00:00 2001 From: amass <168062547@qq.com> Date: Wed, 16 Oct 2024 00:28:44 +0800 Subject: [PATCH] fix ci. --- .gitea/workflows/build_ubuntu.yaml | 7 +++++-- .gitea/workflows/build_windows.yaml | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/build_ubuntu.yaml b/.gitea/workflows/build_ubuntu.yaml index 43cc793..edfdee4 100644 --- a/.gitea/workflows/build_ubuntu.yaml +++ b/.gitea/workflows/build_ubuntu.yaml @@ -18,8 +18,11 @@ jobs: container: image: registry.cn-shenzhen.aliyuncs.com/amass_toolset/ubuntu_dev:24.04 steps: - - name: Check out repository code - uses: actions/checkout@v4 + - name: Clone repository + run: | + echo "git clone --depth 1 --branch=${GITHUB_REF##*/} ssh://git@frp-by1.wwvvww.cn:22022/${{ gitea.repository }}.git" + git clone --depth 1 --branch=${GITHUB_REF##*/} ssh://git@frp-by1.wwvvww.cn:22022/${{ gitea.repository }}.git . + git checkout ${GITHUB_SHA} - run: resources/build.sh build - run: resources/build.sh deploy - name: Notify diff --git a/.gitea/workflows/build_windows.yaml b/.gitea/workflows/build_windows.yaml index 07e174d..104c01e 100644 --- a/.gitea/workflows/build_windows.yaml +++ b/.gitea/workflows/build_windows.yaml @@ -7,12 +7,12 @@ jobs: steps: - name: Set up SSH run: | - if (-Not (Test-Path -Path $HOME\.ssh)) { - mkdir $HOME\.ssh + 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 $HOME\.ssh\id_ed25519 -Encoding ascii - icacls $HOME\.ssh\id_ed25519 /inheritance:r /grant:r "$($env:USERNAME):(F)" - ssh-keyscan -t ed25519 -p 22022 frp-by1.wwvvww.cn | Out-File -FilePath $HOME\.ssh\known_hosts -Encoding ascii + 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 "$($env:USERNAME):(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