fix: update GitHub actions to current versions #186
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: CI | |
| on: | |
| pull_request: | |
| types: ['opened', 'synchronize'] | |
| push: | |
| branches: ['main'] | |
| permissions: {} | |
| jobs: | |
| lint-actions: | |
| name: Lint:${{ matrix.target.title }} | |
| permissions: | |
| contents: read | |
| actions: read | |
| strategy: | |
| matrix: | |
| target: | |
| - title: Workflows | |
| directory: '.' | |
| - title: Composites | |
| directory: './act/' | |
| uses: ./.github/workflows/lint-actions.yaml | |
| with: | |
| path: ${{ matrix.target.directory }} | |
| lint-other: | |
| name: Lint:${{ matrix.target.title }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: | |
| - title: Pre-Commit | |
| command: pre-commit run --all-files | |
| - title: YAML | |
| command: yamllint . # note the trailing '.' | |
| # This command uses `find` to identify all files *not* in '.venv/' and '.git/', pipes | |
| # the output to `awk` to determine if they are shell scripts, and then pipes that | |
| # filtered output into shellcheck. See the below resources for rationale and reference | |
| # implementations: | |
| # | |
| # https://stackoverflow.com/a/16595367 | |
| # https://www.shellcheck.net/wiki/Recursiveness | |
| - title: Shell | |
| command: "find . -not \\( -path ./.git -prune \\) -not \\( -path ./.venv -prune \\) -type f -exec file {} + | awk -F: '/shell script/{print $1}' | xargs -r shellcheck" # yamllint disable-line rule:line-length | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Poetry | |
| uses: ./act/poetry | |
| - name: Lint | |
| run: poetry run ${{ matrix.target.command }} |