Fix workflow YAML syntax
This commit is contained in:
@@ -11,18 +11,7 @@ jobs:
|
|||||||
- name: Validate JSON
|
- name: Validate JSON
|
||||||
run: python3 -c "import json; json.load(open('xray-config.json'))"
|
run: python3 -c "import json; json.load(open('xray-config.json'))"
|
||||||
- name: Validate YAML
|
- name: Validate YAML
|
||||||
run: python3 -c "import yaml; yaml.safe_load(open('clash-meta.yaml'))" || python3 -c "
|
run: python3 -c "import yaml; yaml.safe_load(open('clash-meta.yaml'))"
|
||||||
import sys
|
|
||||||
with open('clash-meta.yaml') as f:
|
|
||||||
content = f.read()
|
|
||||||
# basic YAML check - ensure it parses
|
|
||||||
import importlib
|
|
||||||
yaml = importlib.import_module('yaml') if importlib.util.find_spec('yaml') else None
|
|
||||||
if yaml:
|
|
||||||
yaml.safe_load(content)
|
|
||||||
else:
|
|
||||||
print('PyYAML not available, skipping YAML validation')
|
|
||||||
"
|
|
||||||
|
|
||||||
security:
|
security:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user