fix: replace actions/checkout with git clone (no node on runner)
The linux runner has no Node.js, so actions/checkout@v4 fails. Use manual git clone with token auth instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,10 @@ jobs:
|
||||
test:
|
||||
runs-on: linux
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: |
|
||||
git clone --depth 1 \
|
||||
-c "http.extraHeader=Authorization: token ${{ github.token }}" \
|
||||
"${{ github.server_url }}/${{ github.repository }}.git" .
|
||||
- run: |
|
||||
podman run --rm \
|
||||
-v "$PWD:/app:ro" \
|
||||
@@ -21,9 +24,10 @@ jobs:
|
||||
secrets:
|
||||
runs-on: linux
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- run: |
|
||||
git clone \
|
||||
-c "http.extraHeader=Authorization: token ${{ github.token }}" \
|
||||
"${{ github.server_url }}/${{ github.repository }}.git" .
|
||||
- run: |
|
||||
podman run --rm \
|
||||
-v "$PWD:/scan:ro" \
|
||||
@@ -34,7 +38,10 @@ jobs:
|
||||
needs: [test, secrets]
|
||||
runs-on: linux
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: |
|
||||
git clone --depth 1 \
|
||||
-c "http.extraHeader=Authorization: token ${{ github.token }}" \
|
||||
"${{ github.server_url }}/${{ github.repository }}.git" .
|
||||
- run: echo "$HARBOR_PASS" | podman login -u "$HARBOR_USER" --password-stdin harbor.mymx.me
|
||||
env:
|
||||
HARBOR_USER: ${{ secrets.HARBOR_USER }}
|
||||
|
||||
Reference in New Issue
Block a user