Skip to content
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
18 changes: 14 additions & 4 deletions .github/workflows/squad-standard-lint-markdown.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: lint-markdown

Check warning on line 1 in .github/workflows/squad-standard-lint-markdown.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

1:1 [document-start] missing document start "---"

on:

Check warning on line 3 in .github/workflows/squad-standard-lint-markdown.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

3:1 [truthy] truthy value should be one of [false, true]
pull_request:
Expand All @@ -9,15 +9,25 @@
lint-markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-node@v5
with:
node-version: "22"
- name: Run markdownlint
run: |
files=$(git ls-files '*.md')
if [ "${{ github.event_name }}" = "pull_request" ]; then
base_ref="origin/${{ github.base_ref }}"
git fetch --no-tags --depth=1 origin "${{ github.base_ref }}"
files=$(git diff --name-only "${base_ref}...HEAD" -- '*.md' | tr '\n' ' ')

Check failure on line 23 in .github/workflows/squad-standard-lint-markdown.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

23:81 [line-length] line too long (86 > 80 characters)
else
files=$(git ls-files '*.md' | tr '\n' ' ')
fi

if [ -z "$files" ]; then
echo "No markdown files found."
echo "No markdown files to lint."
exit 0
fi
npx --yes markdownlint-cli $files

npx --yes markdownlint-cli2 $files
17 changes: 14 additions & 3 deletions .github/workflows/squad-standard-lint-yaml.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: lint-yaml

Check warning on line 1 in .github/workflows/squad-standard-lint-yaml.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

1:1 [document-start] missing document start "---"

on:

Check warning on line 3 in .github/workflows/squad-standard-lint-yaml.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

3:1 [truthy] truthy value should be one of [false, true]
pull_request:
Expand All @@ -9,16 +9,27 @@
lint-yaml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Run yamllint
run: |
python -m pip install --quiet yamllint
files=$(git ls-files '*.yml' '*.yaml')

if [ "${{ github.event_name }}" = "pull_request" ]; then
base_ref="origin/${{ github.base_ref }}"
git fetch --no-tags --depth=1 origin "${{ github.base_ref }}"
files=$(git diff --name-only "${base_ref}...HEAD" -- '*.yml' '*.yaml' | tr '\n' ' ')

Check failure on line 25 in .github/workflows/squad-standard-lint-yaml.yml

View workflow job for this annotation

GitHub Actions / lint-yaml

25:81 [line-length] line too long (96 > 80 characters)
else
files=$(git ls-files '*.yml' '*.yaml' | tr '\n' ' ')
fi

if [ -z "$files" ]; then
echo "No YAML files found."
echo "No YAML files to lint."
exit 0
fi

yamllint -s $files
Loading