ci(deps): update github actions (major) #761
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: Lint files | |
| # yamllint disable-line rule:truthy | |
| on: | |
| pull_request: | |
| jobs: | |
| find-changes: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: changes | |
| with: | |
| list-files: "json" | |
| filters: | | |
| json: | |
| - '**/*.json' | |
| markdown: | |
| - '**/*.md' | |
| renovate-config: | |
| - 'renovate.json' | |
| - '.github/renovate.json' | |
| - 'renovate.json5' | |
| - '.github/renovate.json5' | |
| - 'default.json' | |
| workflow: | |
| - '.github/workflows/*.yml' | |
| - '.github/workflows/*.yaml' | |
| yaml: | |
| - '**/*.yaml' | |
| - '**/*.yml' | |
| dockerfile: | |
| - '**/*Dockerfile*' | |
| outputs: | |
| json: ${{ steps.changes.outputs.json }} | |
| markdown: ${{ steps.changes.outputs.markdown }} | |
| renovate-config: ${{ steps.changes.outputs.renovate-config }} | |
| workflow: ${{ steps.changes.outputs.workflow }} | |
| yaml: ${{ steps.changes.outputs.yaml }} | |
| dockerfile_files: ${{ steps.changes.outputs.dockerfile_files }} | |
| lint-json: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| if: needs.find-changes.outputs.json == 'true' | |
| needs: find-changes | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Run JSON Lint | |
| run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/json-lint/master/pipeline.sh) | |
| lint-markdown: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| if: needs.find-changes.outputs.markdown == 'true' | |
| needs: find-changes | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Validate Markdown file | |
| run: | | |
| npm install -g markdownlint-cli | |
| markdownlint -c .config/markdownlint.yml -i CHANGELOG.md "**/*.md" | |
| lint-renovate: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| if: needs.find-changes.outputs.renovate-config == 'true' | |
| needs: find-changes | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - uses: suzuki-shunsuke/github-action-renovate-config-validator@36a15b83e37bf3221dc9c02ff5ffdaefb51ca1cf # v1.1.0 | |
| lint-shell: | |
| name: Check shell scripts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: ShellCheck | |
| uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0 | |
| lint-workflow: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| needs: find-changes | |
| if: needs.find-changes.outputs.workflow == 'true' | |
| container: | |
| image: rhysd/actionlint:1.7.1@sha256:435ecdb63b1169e80ca3e136290072548c07fc4d76a044cf5541021712f8f344 | |
| options: --cpus 1 --user root | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Validate Github workflows | |
| run: | | |
| mkdir .git | |
| actionlint -color | |
| lint-yaml: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| needs: find-changes | |
| if: needs.find-changes.outputs.yaml == 'true' | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: yaml-lint | |
| uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c # v3.1.1 | |
| with: | |
| config_file: .config/yamllint.yml | |
| strict: true | |
| lint-docker: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| needs: find-changes | |
| if: ${{ needs.find-changes.outputs.dockerfile_files != '[]' && needs.find-changes.outputs.dockerfile_files != '' }} | |
| strategy: | |
| matrix: | |
| file: ${{ fromJson(needs.find-changes.outputs.dockerfile_files) }} | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Lint Dockerfile | |
| uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0 | |
| with: | |
| dockerfile: ${{ matrix.file }} |