Skip to content

Update validate-json.yml #7

Update validate-json.yml

Update validate-json.yml #7

Workflow file for this run

name: Validate JSON
on:
pull_request:
push:
branches:
- "test-workflow"
paths:
- public/data.json
jobs:
validate-json:
runs-on: ubuntu-latest
steps:

Check failure on line 12 in .github/workflows/validate-json.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/validate-json.yml

Invalid workflow file

You have an error in your yaml syntax on line 12
- name: Checkout repository
uses: actions/checkout@v3
- name: List workspace files
run: ls -R
- name: Display public/data.json content
run: cat public/data.json
- name: Validate JSON formatting
run: |
if ! jq . public/data.json > /dev/null 2>&1; then
echo "Error: public/data.json is not valid JSON."
exit 1
fi
shell: bash