-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (42 loc) · 1.15 KB
/
bash-format-template.yml
File metadata and controls
42 lines (42 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# SPDX-FileCopyrightText: Copyright (C) 2025-2026 Fabrício Barros Cabral
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
name: bash-format-template
'on':
workflow_call:
inputs:
working-directory:
description: "Set the working directory"
required: false
default: "."
type: string
defaults:
run:
shell: bash -xeuo pipefail {0}
permissions:
contents: read
jobs:
bash-format-template:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup Python SDK
uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Install bashate
working-directory: ${{ inputs.working-directory }}
run: pip install bashate
- name: Check bash format
working-directory: ${{ inputs.working-directory }}
run: |
readarray -t files < <(find . -name "*.sh")
[[ ${#files[@]} -eq 0 ]] && {
echo "No '*.sh'. files found.";
exit 0;
}
bashate -i E006,E003 "${files[@]}"