fix: use podman containers for checkout on minimal host runner
Host runner lacks git and node. Fetch repo archive via wget in alpine container, then run lint/link-check against extracted files. Single-line commands to avoid multiline escaping issues.
This commit is contained in:
@@ -11,29 +11,16 @@ jobs:
|
|||||||
runs-on: linux
|
runs-on: linux
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: podman run --rm -v "$PWD:/out:Z" docker.io/library/alpine:3 sh -c "wget -qO- '${{ github.server_url }}/${{ github.repository }}/archive/${{ github.ref_name }}.tar.gz' | tar xz -C /out --strip-components=1"
|
||||||
git clone --depth 1 --branch "${{ github.ref_name }}" \
|
|
||||||
"${{ github.server_url }}/${{ github.repository }}.git" workspace
|
|
||||||
|
|
||||||
- name: Markdown lint
|
- name: Markdown lint
|
||||||
run: |
|
run: podman run --rm -v "$PWD:/work:Z" docker.io/davidanson/markdownlint-cli2:v0.17.2 "**/*.md"
|
||||||
podman run --rm \
|
|
||||||
-v "$PWD/workspace:/work:Z" \
|
|
||||||
docker.io/davidanson/markdownlint-cli2:v0.17.2 \
|
|
||||||
"**/*.md"
|
|
||||||
|
|
||||||
link-check:
|
link-check:
|
||||||
runs-on: linux
|
runs-on: linux
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: podman run --rm -v "$PWD:/out:Z" docker.io/library/alpine:3 sh -c "wget -qO- '${{ github.server_url }}/${{ github.repository }}/archive/${{ github.ref_name }}.tar.gz' | tar xz -C /out --strip-components=1"
|
||||||
git clone --depth 1 --branch "${{ github.ref_name }}" \
|
|
||||||
"${{ github.server_url }}/${{ github.repository }}.git" workspace
|
|
||||||
|
|
||||||
- name: Check internal links
|
- name: Check internal links
|
||||||
run: |
|
run: podman run --rm -v "$PWD:/work:Z" -w /work docker.io/library/python:3.12-slim python3 scripts/check-links.py
|
||||||
podman run --rm \
|
|
||||||
-v "$PWD/workspace:/work:Z" \
|
|
||||||
-w /work \
|
|
||||||
docker.io/library/python:3.12-slim \
|
|
||||||
python3 scripts/check-links.py
|
|
||||||
|
|||||||
Reference in New Issue
Block a user