Skip to content

Commit

Permalink
actionlint: provision it in Nix shell, and use the same in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed May 15, 2024
1 parent cc25b15 commit c10acd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ jobs:
# Make the Nix environment available to next steps
- uses: rrbutani/use-nix-shell-action@v1

- name: Install actionlint
run: |
# Puts the "actionlint" binary in the working folder
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
- name: Run Actionlint
run: |
for file in $(git ls-files ".github/workflows/*.y*ml")
Expand All @@ -38,7 +33,7 @@ jobs:
then
echo "⚠️ $file is ignored from actionlint's verifications. Please consider fixing it."
else
echo "./actionlint $file"
./actionlint "$file"
echo "actionlint $file"
actionlint "$file"
fi
done
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
stylish-haskell = "0.14.5.0";
};
# and from nixpkgs or other inputs
shell.nativeBuildInputs = with nixpkgs; [ gh jq yq-go shellcheck ];
shell.nativeBuildInputs = with nixpkgs; [ gh jq yq-go actionlint shellcheck ];
# disable Hoogle until someone request it
shell.withHoogle = false;
# Skip cross compilers for the shell
Expand Down

0 comments on commit c10acd8

Please sign in to comment.