fix ci.
Some checks failed
Windows CI / build (push) Failing after 3s
Build Applications / PullDocker (push) Successful in 3s
Build Applications / Build (push) Successful in 2m27s

This commit is contained in:
amass 2024-10-16 01:03:56 +08:00
parent 10aea27972
commit 800369d7a3

View File

@ -5,24 +5,15 @@ jobs:
build: build:
runs-on: [windows11] runs-on: [windows11]
steps: 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 - name: Clone repository
run: | run: |
$branch = "${{ github.ref }}" -replace '^refs/heads/', '' $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 https://$env:GIT_USERNAME:$env:GIT_PASSWORD@amass.fun/gitea/amass/${{ env.GITEA_REPOSITORY }}.git .
git clone --depth 1 --branch=$branch ssh://git@frp-by1.wwvvww.cn:22022/${{ env.GITEA_REPOSITORY }}.git .
git checkout ${{ github.sha }} git checkout ${{ github.sha }}
env: env:
GITEA_REPOSITORY: ${{ gitea.repository }} GITEA_REPOSITORY: ${{ secrets.GITEA_REPOSITORY }}
GIT_USERNAME: ${{ secrets.GIT_USERNAME }}
GIT_PASSWORD: ${{ secrets.GIT_PASSWORD }}
- name: Build and deploy - name: Build and deploy
run: | run: |
resources/build.ps1 build resources/build.ps1 build