Skip to content

Commit 26fe5dd

Browse files
committed
workflows: unified checks
1 parent c58fc30 commit 26fe5dd

File tree

4 files changed

+66
-54
lines changed

4 files changed

+66
-54
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* -text
1+
* -text

.github/workflows/ci-checks.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: ci-checks
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
sh-checker:
13+
runs-on: ubuntu-24.04
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
persist-credentials: false
18+
19+
- name: Run the sh-checker
20+
uses: luizm/[email protected]
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
SHELLCHECK_OPTS: -e SC2034,SC1091 # It is possible to exclude some shellcheck warnings.
24+
SHFMT_OPTS: -ci -sr -i 0 # It is possible to pass arguments to shftm
25+
with:
26+
sh_checker_comment: true
27+
sh_checker_exclude: ""
28+
29+
zizmor-workflow-audits:
30+
runs-on: ubuntu-24.04
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
persist-credentials: false
35+
36+
- name: zizmor workflow audits
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
run: |
40+
pip install zizmor
41+
42+
printf '%b\n' "\`\`\`" >> $GITHUB_STEP_SUMMARY
43+
zizmor . --gh-token $GITHUB_TOKEN >> $GITHUB_STEP_SUMMARY
44+
printf '%b' "\`\`\`" >> $GITHUB_STEP_SUMMARY
45+
46+
editorconfig-checker:
47+
runs-on: ubuntu-24.04
48+
steps:
49+
- uses: actions/checkout@v4
50+
with:
51+
persist-credentials: false
52+
53+
- name: editorconfig-checker
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
run: |
57+
curl -Lo- "https://github.com/editorconfig-checker/editorconfig-checker/releases/latest/download/ec-linux-amd64.tar.gz" | tar xzf - --strip-components=1
58+
59+
printf '%b\n' "\`\`\`" >> $GITHUB_STEP_SUMMARY
60+
./ec-linux-amd64 --exclude '^(docs/.*|patches/.*)$' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" >> $GITHUB_STEP_SUMMARY
61+
outcome=("${PIPESTATUS[@]}")
62+
printf '%b' "\`\`\`" >> $GITHUB_STEP_SUMMARY
63+
64+
# [[ "${outcome[*]}" =~ [1-9] ]] && exit 1 || exit 0
65+

.github/workflows/sh_checker.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/zizmor.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)