diff --git a/.gitea/workflows/pr.yaml b/.gitea/workflows/pr.yaml index 0d096b9..c8a3fdd 100644 --- a/.gitea/workflows/pr.yaml +++ b/.gitea/workflows/pr.yaml @@ -4,24 +4,23 @@ on: pull_request: jobs: - # validate the consumer-facing workflows答复 lint (YAML/structure) - hadolint-shim: + # Validate the workflow yaml files parse (PyYAML via pip only when needed) + yaml-parse: runs-on: ubuntu-latest steps: - - name: Lint the workflow yaml files + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + - name: Parse all workflow yaml files run: | - # Just ensure the yaml files parse and each uses supported fields + pip install pyyaml --quiet python3 - <<'EOF' - import sys, yaml, glob - bad = 0 + import glob, yaml for f in glob.glob('.gitea/workflows/*.yaml'): with open(f) as fh: yaml.safe_load(fh.read()) print(f, 'ok') - sys.exit(1 if bad else 0) EOF - # Validate the CENTRAL config.json itself with renovate-config-validator + # Validate the central config.json itself with renovate-config-validator validate-central-config: uses: ./.gitea/workflows/validate.yaml with: