Skip to content

Commit 35b2eec

Browse files
committed
feat(workflows): add Prettier and Super Linter GitHub Actions
* Introduced `action-prettier.yml` for code formatting using Prettier. * Added `action-super-linter.yml` for linting code with Super Linter. * Both workflows trigger on push events to any branch.
1 parent 951c599 commit 35b2eec

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

.github/workflows/action-prettier.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Prettier
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
7+
concurrency:
8+
group: prettier-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
prettier:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v5
21+
22+
- name: Install Prettier and plugins
23+
run: |
24+
npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template
25+
26+
- name: Prettify code
27+
uses: creyD/prettier_action@v4.6
28+
with:
29+
prettier_plugins: "prettier-plugin-sh prettier-plugin-jinja-template"
30+
prettier_options: --write .
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: Super Linter
3+
4+
on:
5+
push:
6+
branches:
7+
- "*"
8+
9+
concurrency:
10+
group: super-linter-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions: {}
14+
15+
jobs:
16+
build:
17+
name: Lint
18+
runs-on: ubuntu-latest
19+
20+
permissions:
21+
contents: read
22+
packages: read
23+
# To report GitHub Actions status checks
24+
statuses: write
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v5
29+
with:
30+
# super-linter needs the full git history to get the
31+
# list of files that changed across commits
32+
fetch-depth: 0
33+
34+
- name: Install Prettier plugins (for summary formatting)
35+
run: |
36+
npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template || true
37+
38+
- name: Super-linter
39+
uses: super-linter/super-linter@v8
40+
env:
41+
# To report GitHub Actions status checks
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
VALIDATE_JSCPD: false
44+
VALIDATE_SHELL_SHFMT: false
45+
VALIDATE_YAML_PRETTIER: false
46+
VALIDATE_JSON_PRETTIER: false
47+
VALIDATE_MARKDOWN_PRETTIER: false

0 commit comments

Comments
 (0)