Skip to content

Commit 2024399

Browse files
Pigbibicodex
andcommitted
ci: add workflow lint and whitespace checks
Co-Authored-By: Codex <noreply@openai.com>
1 parent 2c0c280 commit 2024399

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ on:
77
- main
88

99
jobs:
10+
actionlint:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 10
13+
permissions:
14+
contents: read
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v6
18+
19+
- name: Actionlint
20+
uses: docker://rhysd/actionlint:1.7.12
21+
1022
test:
1123
runs-on: ubuntu-latest
1224
permissions:
@@ -15,6 +27,16 @@ jobs:
1527
- name: Checkout repository
1628
uses: actions/checkout@v6
1729

30+
- name: Check whitespace
31+
run: |
32+
set -euo pipefail
33+
if [ "${{ github.event_name }}" = "pull_request" ]; then
34+
git fetch --no-tags --depth=1 origin "${{ github.base_ref }}"
35+
git diff --check "origin/${{ github.base_ref }}...HEAD"
36+
else
37+
git diff-tree --check --no-commit-id --root -r HEAD
38+
fi
39+
1840
- name: Set up Python
1941
uses: actions/setup-python@v6
2042
with:

0 commit comments

Comments
 (0)