-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #536 from IntersectMBO/smelc/run-actionlint-in-ci
Run actionlint in CI + make it available in dev shell
- Loading branch information
Showing
6 changed files
with
48 additions
and
9 deletions.
There are no files selected for viewing
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Actionlint | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
actionlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Note that, because our Nix configuration provisions *both* shellcheck and actionlint, | ||
# actionlint is not going to install its own shellcheck. | ||
# This also makes sure that this pipeline runs using | ||
# the same shellcheck as the ones in Nix shells of developers. | ||
- name: Install Nix with good defaults | ||
uses: input-output-hk/install-nix-action@v20 | ||
with: | ||
extra_nix_config: | | ||
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= | ||
substituters = https://cache.iog.io/ https://cache.nixos.org/ | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
- uses: cachix/install-nix-action@v18 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
# Make the Nix environment available to next steps | ||
- uses: rrbutani/use-nix-shell-action@v1 | ||
|
||
- name: actionlint | ||
run: | | ||
for file in $(git ls-files ".github/workflows/*.y*ml") | ||
do | ||
if grep -q "$file" ".github/workflows/actionlint-exceptions.txt" | ||
then | ||
echo "⚠️ $file is ignored from actionlint's verifications. Please consider fixing it." | ||
else | ||
echo "actionlint $file" | ||
actionlint "$file" | ||
fi | ||
done |
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
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
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
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