Merge pull request #484 from nextmv-io/merschformann/fix-zizmor #3259
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: json lint | |
| on: | |
| push: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| jobs: | |
| sdk-json-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: git clone | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: set up node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 18.8 | |
| - name: install prettier | |
| run: npm install prettier@v2.7.1 --global | |
| - name: lint .json files with prettier | |
| run: | | |
| # Only lint if there are .json files in the repo. | |
| if [ -n "$(find . -type f -name '*.json')" ]; then | |
| prettier -c "**/*.json" | |
| fi |