CI: add actionlint #9
Workflow file for this run
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: Actionlint | |
| on: | |
| pull_request: | |
| paths: | |
| - ".github/workflows/**" | |
| push: | |
| branches: main | |
| paths: | |
| - ".github/workflows/**" | |
| workflow_dispatch: | |
| # Restrict permissions for GITHUB_TOKEN to minimum required | |
| permissions: | |
| contents: read | |
| # All other permissions are implicitly none | |
| jobs: | |
| actionlint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false # Because installing actionlint runs arbitrary code, we discard the GITHUB_TOKEN after this step | |
| # Taken from https://github.com/rhysd/actionlint/blob/v1.7.7/docs/usage.md#use-actionlint-on-github-actions | |
| - uses: cachix/install-nix-action@v29 | |
| - name: Check workflow files | |
| run: | | |
| export NIX_PATH=nixpkgs=$(nix-instantiate --eval -A pkgs.path) | |
| nix-shell -p actionlint --run actionlint |