Merge pull request #221 from spidernet-io/dependabot/github_actions/a… #191
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: Auto Yaml Lint | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release-* | |
| - github_pages | |
| paths: | |
| - '**.yml' | |
| - '**.yaml' | |
| pull_request: | |
| branches: | |
| - main | |
| - release-* | |
| - github_pages | |
| paths: | |
| - '**.yml' | |
| - '**.yaml' | |
| # checkout all markdown | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: 'check all yaml for branch, sha, tag' | |
| required: true | |
| default: main | |
| jobs: | |
| linkyaml: | |
| runs-on: ubuntu-latest | |
| name: Yaml Lint | |
| steps: | |
| - name: Checkout | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.inputs.tag }} | |
| - name: Checkout | |
| if: ${{ github.event_name != 'workflow_dispatch' }} | |
| uses: actions/checkout@v4 | |
| - name: yaml-lint | |
| id: yaml-lint | |
| continue-on-error: true | |
| uses: ibiqlik/action-yamllint@v3 | |
| with: | |
| file_or_dir: '.' | |
| config_file: '.github/yamllint-conf.yml' | |
| - name: Upload artifact digests | |
| if: ${{ steps.yaml-lint.outcome == 'failure' }} | |
| uses: actions/[email protected] | |
| with: | |
| name: log | |
| path: ${{ steps.yaml-lint.outputs.logfile }} | |
| retention-days: 1 | |
| - name: Result | |
| if: ${{ steps.yaml-lint.outcome == 'failure' }} | |
| run: | | |
| exit 1 |