Fix workflow YAML syntax
This commit is contained in:
@@ -11,18 +11,7 @@ jobs:
|
||||
- name: Validate JSON
|
||||
run: python3 -c "import json; json.load(open('xray-config.json'))"
|
||||
- name: Validate YAML
|
||||
run: python3 -c "import yaml; yaml.safe_load(open('clash-meta.yaml'))" || python3 -c "
|
||||
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')
|
||||
"
|
||||
run: python3 -c "import yaml; yaml.safe_load(open('clash-meta.yaml'))"
|
||||
|
||||
security:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user