bump gitpod/workspace-full from 02b1c88
to e3827b6
(#207)
#55
This file contains 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: | |
# target only the default branch to avoid duplicate worklow runs | |
branches: | |
- main | |
jobs: | |
format-json: | |
name: Format JSON files and create a pull request | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install linter | |
run: | | |
command sudo npm install \ | |
--location=global \ | |
--loglevel=verbose \ | |
-- @prantlf/jsonlint | |
- name: Lint | |
run: | | |
command find -- . \ | |
-type f \ | |
! -path '*/.git/*' \ | |
! -path '*/node_modules/*' \ | |
! -path '*vscode*' \ | |
'(' \ | |
-name '*.json' -o \ | |
-name '*.4DForm' -o \ | |
-name '*.4DProject' -o \ | |
-name '*.avsc' -o \ | |
-name '*.cy' -o \ | |
-name '*.geojson' -o \ | |
-name '*.gltf' -o \ | |
-name '*.har' -o \ | |
-name '*.ice' -o \ | |
-name '*.JSON' -o \ | |
-name '*.JSON-tmLanguage' -o \ | |
-name '*.JSON5' -o \ | |
-name '*.json5' -o \ | |
-name '*.jsonl' -o \ | |
-name '*.jsonld' -o \ | |
-name '*.maxhelp' -o \ | |
-name '*.maxpat' -o \ | |
-name '*.maxproj' -o \ | |
-name '*.mcmeta' -o \ | |
-name '*.mxt' -o \ | |
-name '*.stats' -o \ | |
-name '*.tfstate' -o \ | |
-name '*.tfstate.backup' -o \ | |
-name '*.topojson' -o \ | |
-name '*.webapp' -o \ | |
-name '*.webmanifest' -o \ | |
-name '*.yy' -o \ | |
-name '*.yyp' -o \ | |
-name '*app-site-association' -o \ | |
-name '.arcconfig' -o \ | |
-name '.auto-changelog' -o \ | |
-name '.c8rc' -o \ | |
-name '.dccache' -o \ | |
-name '.flutter' -o \ | |
-name '.flutter_tool_state' -o \ | |
-name '.htmlhintrc' -o \ | |
-name '.imgbotconfig' -o \ | |
-name '.nycrc' -o \ | |
-name '.tern-config' -o \ | |
-name '.tern-project' -o \ | |
-name '.vs-liveshare-keychain' -o \ | |
-name '.vsconfig' -o \ | |
-name '.watchmanconfig' -o \ | |
-name '.whitesource' -o \ | |
-name 'mcmod.info' \ | |
')' \ | |
-print \ | |
-exec sh -v -x -c ' | |
command npm exec -- @prantlf/jsonlint \ | |
--in-place \ | |
--prune-comments \ | |
--trailing-newline \ | |
--trim-trailing-commas \ | |
-- "{}"; \ | |
test "$( \ | |
command git hash-object -- "{}" \ | |
)" = "417b7b5370df81a7316ee9f983437444afdae432" && \ | |
command git restore --progress --source=HEAD -- "{}"' ';' | |
- uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: "[autofix] format JSON content" | |
title: "[autofix] format JSON content" | |
body: > | |
Auto-generated on [run #${{ github.run_id }}](${{ | |
github.event.repository.html_url }}/actions/runs/${{ github.run_id | |
}}) as defined by [workflow action](${{ | |
github.event.repository.html_url }}/blob/${{ github.sha | |
}}/.github/workflows/jsonlint.yml). | |
labels: enhancement, github_actions | |
branch: format-json | |
base: ${{ github.head_ref }} | |
... |