chore(deps): update jdx/mise-action action to v4 (#18) #49
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: check | |
| on: | |
| push: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.sha || github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup mise | |
| uses: jdx/mise-action@v4 | |
| - name: Find bash scripts | |
| id: find-bash | |
| run: | | |
| bash_files="" | |
| # bin/ scripts without .sh extension | |
| for f in $(find ./bin -maxdepth 1 -type f -not -name '*.sh' -not -path './.git/*'); do | |
| shebang=$(head -1 "$f") | |
| if echo "$shebang" | grep -qE '(bash|^#!/bin/sh)'; then | |
| bash_files="$bash_files $f" | |
| fi | |
| done | |
| echo "files=$bash_files" >> "$GITHUB_OUTPUT" | |
| echo "Found bash files:$bash_files" | |
| - name: ShellCheck | |
| if: steps.find-bash.outputs.files != '' | |
| run: | | |
| bash_files="${{ steps.find-bash.outputs.files }}" | |
| echo "Running ShellCheck on:$bash_files" | |
| shellcheck $bash_files | |
| - name: shfmt check | |
| if: steps.find-bash.outputs.files != '' | |
| run: | | |
| bash_files="${{ steps.find-bash.outputs.files }}" | |
| echo "Running shfmt on:$bash_files" | |
| # -d shows diff; indent settings sourced from .editorconfig | |
| shfmt -d $bash_files | |
| - name: EditorConfig check | |
| uses: editorconfig-checker/action-editorconfig-checker@main | |
| - name: Run editorconfig-checker | |
| run: editorconfig-checker |