ci: fix PR checks (install pyyaml before parsing)
Renovate Config Validation / validate (pull_request) Successful in 13s
PR Checks / yaml-parse (pull_request) Failing after 14s
PR Checks / validate-central-config (pull_request) Successful in 13s

This commit is contained in:
Hermes Agent committed 2026-10-08 21:09:59 +00:00
1 parent ad0d215945
commit cb39a2bb38
1 file changed
+7 -8
+7 -8
View File
@@ -4,24 +4,23 @@ on:
pull_request: pull_request:
jobs: jobs:
# validate the consumer-facing workflows答复 lint (YAML/structure) # Validate the workflow yaml files parse (PyYAML via pip only when needed)
hadolint-shim: yaml-parse:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Lint the workflow yaml files - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Parse all workflow yaml files
run: | run: |
# Just ensure the yaml files parse and each uses supported fields pip install pyyaml --quiet
python3 - <<'EOF' python3 - <<'EOF'
import sys, yaml, glob import glob, yaml
bad = 0
for f in glob.glob('.gitea/workflows/*.yaml'): for f in glob.glob('.gitea/workflows/*.yaml'):
with open(f) as fh: with open(f) as fh:
yaml.safe_load(fh.read()) yaml.safe_load(fh.read())
print(f, 'ok') print(f, 'ok')
sys.exit(1 if bad else 0)
EOF EOF
# Validate the CENTRAL config.json itself with renovate-config-validator # Validate the central config.json itself with renovate-config-validator
validate-central-config: validate-central-config:
uses: ./.gitea/workflows/validate.yaml uses: ./.gitea/workflows/validate.yaml
with: with: