Skip to content

How to read review by phases #276

How to read review by phases

How to read review by phases #276

# JSON Schema validation for handbook assets: runs every Makefile found under handbooks/.

Check failure on line 1 in .github/workflows/handbooks-json-schema.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/handbooks-json-schema.yml

Invalid workflow file

(Line: 32, Col: 9): Unexpected symbol: '"true"'. Located at position 38 within expression: needs.pre_job.outputs.should_skip != "true"
name: handbooks-json-schema
on:
push:
branches: ["*"]
paths:
- "handbooks/**"
- ".github/workflows/handbooks-json-schema.yml"
pull_request:
branches: ["*"]
paths:
- "handbooks/**"
- ".github/workflows/handbooks-json-schema.yml"
workflow_dispatch:
jobs:
pre_job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v3.4.0
with:
skip_after_successful_duplicate: "true"
same_content_newer: "true"
validate:
name: Validate handbook JSON (Makefiles)
needs: pre_job
if: needs.pre_job.outputs.should_skip != "true"
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install jsonschema
run: pip install "jsonschema>=4.0.0"
- name: Run Makefiles under handbooks
run: |
set -euo pipefail
found=0
while IFS= read -r -d '' makefile; do
found=1
dir=$(dirname "$makefile")
echo "::group::make in $dir"
(cd "$dir" && make)
echo "::endgroup::"
done < <(find handbooks -type f -name Makefile -print0)
if [ "$found" -eq 0 ]; then
echo "No Makefiles under handbooks/; nothing to run."
fi