1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00
Slimefun4/.github/workflows/json-validator.yml
naveen 55c9251d5b chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-05-08 01:00:37 +00:00

28 lines
608 B
YAML

name: Validate JSON
on:
push:
paths:
- 'src/main/resources/wiki.json'
pull_request:
paths:
- 'src/main/resources/wiki.json'
permissions:
contents: read
jobs:
validate:
name: Validate JSON
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Validate wiki.json
uses: docker://orrosenblatt/validate-json-action:latest@sha256:02370758b8b199e0477da11ecfdd498c75c561685056b5c31b925a4ab95df7f4
env:
INPUT_SCHEMA: '.github/configs/wiki-schema.json'
INPUT_JSONS: 'src/main/resources/wiki.json'