Skip to content

Commit e2e1341

Browse files
committed
Add automated code quality checks with GitHub Actions and Dependabot
1 parent c0ba375 commit e2e1341

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"

.github/workflows/lint.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
hadolint:
13+
name: hadolint (${{ matrix.dockerfile }})
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
dockerfile: [Dockerfile.ol7, Dockerfile.ol8]
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v5
21+
- name: Run hadolint on ${{ matrix.dockerfile }}
22+
uses: hadolint/hadolint-action@v3
23+
with:
24+
dockerfile: ${{ matrix.dockerfile }}
25+
26+
shellcheck:
27+
name: ShellCheck
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v5
32+
- name: Run ShellCheck
33+
run: find . -type f -name "*.sh" -exec shellcheck {} +
34+
35+
shfmt:
36+
name: shfmt
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v5
41+
- name: Run shfmt
42+
uses: luizm/action-sh-checker@v2
43+
env:
44+
SHFMT_OPTS: -l -d -i 2 -ci -bn
45+
with:
46+
sh_checker_shellcheck_disable: true

0 commit comments

Comments
 (0)