bot: bump codacy/codacy-analysis-cli-action from 4.4.1 to 4.4.5 #49
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
on: | |
pull_request: | |
branches: [ "main" ] | |
push: | |
branches: [ "main" ] | |
name: lint | |
permissions: | |
contents: read | |
jobs: | |
list-files: | |
name: Find changed files | |
runs-on: ubuntu-latest | |
outputs: | |
sh-changed-files: ${{ steps.changed-files-sh.outputs.all_changed_files }} | |
sh-any-changed: ${{ steps.changed-files-sh.outputs.any_changed }} | |
md-changed-files: ${{ steps.changed-files-md.outputs.all_changed_files }} | |
md-any-changed: ${{ steps.changed-files-md.outputs.any_changed }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- name: Get changed SH files | |
id: changed-files-sh | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
**.sh | |
- name: Get changed MD files | |
id: changed-files-md | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
**.md | |
sh-check-changed: | |
name: Check changed shellscripts | |
needs: list-files | |
if: needs.list-files.outputs.sh-any-changed == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check syntax | |
uses: Klintrup/simple-shell-syntax-check@v2.2.0 | |
with: | |
files: ${{ needs.list-files.outputs.sh-changed-files }} | |
install_missing_shell: true | |
prettier-md: | |
name: Prettify changed markdown files | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
if: needs.list-files.outputs.md-any-changed == 'true' | |
needs: list-files | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- name: Prettify code | |
uses: creyD/prettier_action@v4.3 | |
with: | |
prettier_options: --write ${{ needs.list-files.outputs.md-changed-files }} | |