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:
|
test:
|
||||||
runs-on: linux
|
runs-on: linux
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- run: |
|
||||||
|
git clone --depth 1 \
|
||||||
|
-c "http.extraHeader=Authorization: token ${{ github.token }}" \
|
||||||
|
"${{ github.server_url }}/${{ github.repository }}.git" .
|
||||||
- run: |
|
- run: |
|
||||||
podman run --rm \
|
podman run --rm \
|
||||||
-v "$PWD:/app:ro" \
|
-v "$PWD:/app:ro" \
|
||||||
@@ -21,9 +24,10 @@ jobs:
|
|||||||
secrets:
|
secrets:
|
||||||
runs-on: linux
|
runs-on: linux
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- run: |
|
||||||
with:
|
git clone \
|
||||||
fetch-depth: 0
|
-c "http.extraHeader=Authorization: token ${{ github.token }}" \
|
||||||
|
"${{ github.server_url }}/${{ github.repository }}.git" .
|
||||||
- run: |
|
- run: |
|
||||||
podman run --rm \
|
podman run --rm \
|
||||||
-v "$PWD:/scan:ro" \
|
-v "$PWD:/scan:ro" \
|
||||||
@@ -34,7 +38,10 @@ jobs:
|
|||||||
needs: [test, secrets]
|
needs: [test, secrets]
|
||||||
runs-on: linux
|
runs-on: linux
|
||||||
steps:
|
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
|
- run: echo "$HARBOR_PASS" | podman login -u "$HARBOR_USER" --password-stdin harbor.mymx.me
|
||||||
env:
|
env:
|
||||||
HARBOR_USER: ${{ secrets.HARBOR_USER }}
|
HARBOR_USER: ${{ secrets.HARBOR_USER }}
|
||||||
|
|||||||
Reference in New Issue
Block a user