From a57dc9a11b67ce06271f6d859960168b936d3d4e Mon Sep 17 00:00:00 2001 From: amass <168062547@qq.com> Date: Wed, 16 Oct 2024 00:37:45 +0800 Subject: [PATCH] fix ci. --- .gitea/workflows/build_ubuntu.yaml | 6 ++++++ .gitea/workflows/build_windows.yaml | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build_ubuntu.yaml b/.gitea/workflows/build_ubuntu.yaml index edfdee4..d4a697b 100644 --- a/.gitea/workflows/build_ubuntu.yaml +++ b/.gitea/workflows/build_ubuntu.yaml @@ -18,6 +18,12 @@ jobs: container: image: registry.cn-shenzhen.aliyuncs.com/amass_toolset/ubuntu_dev:24.04 steps: + - name: Set up SSH + run: | + mkdir -p ~/.ssh/ + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + ssh-keyscan -t ed25519 -p 22022 frp-by1.wwvvww.cn >> ~/.ssh/known_hosts - name: Clone repository run: | echo "git clone --depth 1 --branch=${GITHUB_REF##*/} ssh://git@frp-by1.wwvvww.cn:22022/${{ gitea.repository }}.git" diff --git a/.gitea/workflows/build_windows.yaml b/.gitea/workflows/build_windows.yaml index 104c01e..d56220b 100644 --- a/.gitea/workflows/build_windows.yaml +++ b/.gitea/workflows/build_windows.yaml @@ -11,7 +11,6 @@ jobs: 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 "$($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 }} @@ -22,7 +21,7 @@ jobs: git clone --depth 1 --branch=$branch ssh://git@frp-by1.wwvvww.cn:22022/${{ env.GITEA_REPOSITORY }}.git . git checkout ${{ github.sha }} env: - GITEA_REPOSITORY: ${{ secrets.GITEA_REPOSITORY }} + GITEA_REPOSITORY: ${{ gitea.repository }} - name: Build and deploy run: | resources/build.ps1 build