Update weekly_bashbeautify.yaml

This commit is contained in:
Alexandre
2023-12-24 04:35:19 +01:00
committed by GitHub
parent 64891f994e
commit 43add20233

View File

@@ -4,25 +4,36 @@ on:
schedule: schedule:
- cron: "0 0 * * 0" - cron: "0 0 * * 0"
workflow_dispatch: workflow_dispatch:
concurrency:
group: lint-bash-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs: jobs:
beautify: lint-bash:
name: Lint Bash Scripts
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout Git Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Python Environment
uses: actions/setup-python@v4
with: with:
ref: ${{ github.head_ref }} python-version: "3.11"
- uses: actions/setup-python@v3
- name: "Install beautify" - name: Install Beautysh
uses: BSFishy/pip-action@v1 run: pip install beautysh
with:
packages: | - name: Run Beautysh
beautysh
- name: "Run beautify"
run: | run: |
find . -name '*.sh' -print0 | xargs -0 beautysh --indent-size 4 shopt -s globstar nullglob
if compgen -G "**/*.sh" > /dev/null; then
beautysh **/*.sh --indent-size 4 --check
fi
shopt -u globstar nullglob
- name: Commit if needed - name: Commit if needed
uses: EndBug/add-and-commit@v9 uses: EndBug/add-and-commit@v9
with: with: