[bot/no ci/super-linter] fix formatting #168
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: sources.json | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - "sources.json" | |
| pull_request_target: | |
| types: | |
| - opened | |
| - synchronize | |
| paths: | |
| - "sources.json" | |
| jobs: | |
| validate-and-sort: | |
| runs-on: ubuntu-latest | |
| if: ${{ !endsWith(github.actor, '[bot]') }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Pull | |
| uses: actions/checkout@main | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name || github.head_ref.repo.full_name || github.ref.repo.full_name }} | |
| - name: Schema (walbo/validate-json) | |
| continue-on-error: true | |
| uses: walbo/validate-json@main | |
| with: | |
| files: sources.json | |
| schema: sources.schema.json | |
| schema-version: draft-07 | |
| allow-union-types: true | |
| strict: false | |
| allow-matching-properties: false | |
| fail-on-missing-schema: true | |
| # print-valid-files: false | |
| - name: Schema (cardinalby/schema-validator-action) | |
| continue-on-error: true | |
| uses: cardinalby/schema-validator-action@master | |
| with: | |
| file: sources.json | |
| schema: sources.schema.json | |
| fixSchemas: true | |
| - name: Schema (dsanders11/json-schema-validate-action) | |
| continue-on-error: true | |
| uses: dsanders11/json-schema-validate-action@main | |
| with: | |
| files: sources.json | |
| schema: sources.schema.json | |
| - name: Schema (ammarlakis/action-ajv) | |
| continue-on-error: true | |
| uses: ammarlakis/action-ajv@master | |
| with: | |
| data: sources.json | |
| schema: sources.schema.json | |
| allErrors: true | |
| verbose: true | |
| - name: Sort | |
| continue-on-error: true | |
| uses: yakubique/json-utils@main | |
| id: sorted_sources | |
| with: | |
| space: 4 # indent | |
| action: "sort" | |
| type: "nested-json" | |
| key: "name" | |
| from_file: "true" | |
| to_file: "true" | |
| input: "sources.json" | |
| - name: Move sorted | |
| continue-on-error: true | |
| run: | | |
| cp "${{ steps.sorted_sources.outputs.result }}" sources.json | |
| git add sources.json | |
| - name: Push sorted | |
| continue-on-error: true | |
| uses: stefanzweifel/git-auto-commit-action@master | |
| with: | |
| branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }} | |
| commit_message: "[bot/no ci/json-utils] Sort sources.json\n\nskip-checks: true" |