Skip to content

Only run install and build when needed #3026

Only run install and build when needed

Only run install and build when needed #3026

Workflow file for this run

name: Lint
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.ref_name }}-lint
cancel-in-progress: true
permissions:
contents: read
jobs:
checks:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Mise
uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3.6.3
- name: Install dependencies
run: |
yarn install
- name: Run lint
run: |
mise run lint --no-progress
lint:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Enable corepack
run: corepack enable
- name: Set Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: .nvmrc
- name: Install dependencies
run: |
corepack yarn install
- name: Lint the code
run: |
corepack yarn run lint
- name: Run format check
run: |
corepack yarn run format
- name: Check for uncommitted changes
run: |
if [ "$(git diff --ignore-space-at-eol | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after linting. See status below:"
git diff
exit 1
fi
actionlint:
name: Actionlint
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Lint Actions
uses: reviewdog/action-actionlint@0d952c597ef8459f634d7145b0b044a9699e5e43 # v1.71.0
with:
actionlint_flags: -shellcheck ""
markdown-lint:
name: Markdown Lint
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Lint Markdown
uses: DavidAnson/markdownlint-cli2-action@07035fd053f7be764496c0f8d8f9f41f98305101 # v22.0.0
with:
config: .markdownlint-cli2.yaml
globs: "**/*.md"
fix: false
yaml-lint:
name: YAML lint
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Lint YAML
uses: reviewdog/action-yamllint@f01d8a48fd8d89f89895499fca2cff09f9e9e8c0 # v1.21.0