Skip to content

Commit

Permalink
workflows: unified checks
Browse files Browse the repository at this point in the history
  • Loading branch information
userdocs committed Jan 6, 2025
1 parent c58fc30 commit 26fe5dd
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* -text
* -text
65 changes: 65 additions & 0 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: ci-checks
on:
push:
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
sh-checker:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Run the sh-checker
uses: luizm/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHELLCHECK_OPTS: -e SC2034,SC1091 # It is possible to exclude some shellcheck warnings.
SHFMT_OPTS: -ci -sr -i 0 # It is possible to pass arguments to shftm
with:
sh_checker_comment: true
sh_checker_exclude: ""

zizmor-workflow-audits:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: zizmor workflow audits
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install zizmor
printf '%b\n' "\`\`\`" >> $GITHUB_STEP_SUMMARY
zizmor . --gh-token $GITHUB_TOKEN >> $GITHUB_STEP_SUMMARY
printf '%b' "\`\`\`" >> $GITHUB_STEP_SUMMARY
editorconfig-checker:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: editorconfig-checker
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -Lo- "https://github.com/editorconfig-checker/editorconfig-checker/releases/latest/download/ec-linux-amd64.tar.gz" | tar xzf - --strip-components=1
printf '%b\n' "\`\`\`" >> $GITHUB_STEP_SUMMARY
./ec-linux-amd64 --exclude '^(docs/.*|patches/.*)$' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" >> $GITHUB_STEP_SUMMARY
outcome=("${PIPESTATUS[@]}")
printf '%b' "\`\`\`" >> $GITHUB_STEP_SUMMARY
# [[ "${outcome[*]}" =~ [1-9] ]] && exit 1 || exit 0
26 changes: 0 additions & 26 deletions .github/workflows/sh_checker.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/zizmor.yml

This file was deleted.

0 comments on commit 26fe5dd

Please sign in to comment.