Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate actionlint #522

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint GitHub Actions workflows
on:
push:
branches:
- main
paths:
- '.github/**'
pull_request:
paths:
- '.github/**'
workflow_dispatch:

jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash
- name: Check workflow files
run: ${{ steps.get_actionlint.outputs.executable }} -color
shell: bash
8 changes: 8 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ script = [
"dprint fmt",
]

[tasks.fmt]
alias = "format-apply"

[tasks.lint-apply]
category = "Tools"
description = "Run linters with changes"
Expand All @@ -41,9 +44,13 @@ dependencies = [
"format-check",
]
script = [
"actionlint",
"npm run lint:check",
]

[tasks.lint]
alias = "lint-check"

[tasks.test-ts]
category = "Tools"
description = 'Test typescripts'
Expand Down Expand Up @@ -86,6 +93,7 @@ script = [
"dprint --version",
# Returnes NON 0, why...? :<
# "nixpkgs-fmt --version",
"actionlint --version",
]

[tasks.check_no_git_diff]
Expand Down
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ pkgs.mkShell {
pkgs.cargo-make
pkgs.nil
pkgs.nixpkgs-fmt
pkgs.actionlint
];
}