fix: CI checkout 失败,在 checkout 前安装 git 避免不兼容的 REST API 回退
Some checks failed
CI/CD Pipeline / Code Quality (push) Failing after 3s
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Build Test Image (push) Has been skipped
CI/CD Pipeline / Build Production Image (push) Has been skipped
CI/CD Pipeline / Deploy to Test (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped

This commit is contained in:
Wang Zhuoxuan 2026-04-17 11:51:39 +08:00
parent 95bb1e0cd4
commit a93b67185c

View File

@ -20,6 +20,9 @@ jobs:
name: Code Quality
runs-on: ubuntu-latest
steps:
- name: Install git
run: apk add --no-cache git
- name: Checkout code
uses: actions/checkout@v4
@ -41,6 +44,9 @@ jobs:
runs-on: ubuntu-latest
needs: quality
steps:
- name: Install git
run: apk add --no-cache git
- name: Checkout code
uses: actions/checkout@v4
@ -66,6 +72,9 @@ jobs:
needs: [quality, test]
if: github.ref == 'refs/heads/develop'
steps:
- name: Install git
run: apk add --no-cache git
- name: Checkout code
uses: actions/checkout@v4
@ -89,6 +98,9 @@ jobs:
needs: [quality, test]
if: github.ref == 'refs/heads/main'
steps:
- name: Install git
run: apk add --no-cache git
- name: Checkout code
uses: actions/checkout@v4