From 9c8194dec2ed84c63279aa9b4eea9c9a60234c0e Mon Sep 17 00:00:00 2001 From: amass <168062547@qq.com> Date: Wed, 16 Oct 2024 01:38:35 +0800 Subject: [PATCH] fix ci. --- .gitea/workflows/release_ubuntu.yaml | 17 ++++++++++++----- .gitea/workflows/release_windows.yaml | 9 ++++++--- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/release_ubuntu.yaml b/.gitea/workflows/release_ubuntu.yaml index 67d2588..d302573 100644 --- a/.gitea/workflows/release_ubuntu.yaml +++ b/.gitea/workflows/release_ubuntu.yaml @@ -8,12 +8,19 @@ jobs: Build: runs-on: [ubuntu-latest, ubuntu-24.04] container: - image: frp-by1.wwvvww.cn:45288/ubuntu_dev:24.04 + image: registry.cn-shenzhen.aliyuncs.com/amass_toolset/ubuntu_dev:24.04 steps: - - name: Check out repository code - uses: actions/checkout@v4 - with: - fetch-depth: 0 + - 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" + 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: Generate Changelog diff --git a/.gitea/workflows/release_windows.yaml b/.gitea/workflows/release_windows.yaml index dc6b430..4289ee0 100644 --- a/.gitea/workflows/release_windows.yaml +++ b/.gitea/workflows/release_windows.yaml @@ -8,8 +8,11 @@ jobs: build: runs-on: [windows11] steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Clone repository + run: | + $branch = "${{ github.ref }}" -replace '^refs/heads/', '' + git clone --depth 1 --branch=$branch https://${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_PASSWORD }}@amass.fun/gitea/${{ gitea.repository }}.git . + git checkout ${{ github.sha }} - name: Build and deploy run: | resources/build.ps1 build @@ -20,4 +23,4 @@ jobs: with: body_path: build/CHANGELOG.txt files: |- - build/SmartLockerTools.zip \ No newline at end of file + build/SmartLockerTools_${{ env.tag }}.zip \ No newline at end of file