change for test #82
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: Push Check schema | |
| on: | |
| push: | |
| paths: | |
| - 'servers/**' | |
| jobs: | |
| Schema-validation: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: echo first commit | |
| run: | | |
| echo ${{ github.event.before }} | |
| - name: get changed files | |
| id: getfile | |
| run: | | |
| if [ ${{ github.event.before }} == '0000000000000000000000000000000000000000' ]; then | |
| echo "files=$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | grep '^servers/' | xargs)" >> $GITHUB_OUTPUT | |
| else | |
| echo "files=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '^servers/'| xargs)" >> $GITHUB_OUTPUT | |
| fi | |
| - name: echo output | |
| run: | | |
| echo ${{ steps.getfile.outputs.files }} | |
| - name: Install check-jsonschema | |
| run: pip install check-jsonschema | |
| - name: Run Check-jsonschema | |
| run: check-jsonschema --schemafile .schema.yml ${{ steps.getfile.outputs.files }} | |
| Lint-yaml: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@v7 | |
| - name: Lint yaml files | |
| uses: ibiqlik/action-yamllint@v3 | |
| with: | |
| file_or_dir: ${{ steps.getfile.outputs.files }} | |
| format: github |