Skip to content

Commit 29fbc95

Browse files
committed
ci: update of common workflows
1 parent 4f06cab commit 29fbc95

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
# This workflow executes several linters on changed files based on languages used in your code base whenever
3+
# you push a code or open a pull request.
4+
#
5+
# You can adjust the behavior by modifying this file.
6+
# For more information, see:
7+
# https://github.com/super-linter/super-linter
8+
# Configuration file for super-linter example:
9+
# .github/super-linter.env
10+
# Configuration files for individual linters should be placed in .github/linters
11+
12+
name: Lint Code Base
13+
14+
on:
15+
push:
16+
branches: ["main"]
17+
pull_request:
18+
branches: ["main"]
19+
workflow_dispatch:
20+
inputs:
21+
full_scan:
22+
type: boolean
23+
default: false
24+
required: false
25+
description: "Lint all codebase"
26+
permissions:
27+
contents: read
28+
29+
jobs:
30+
run-lint:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v4
35+
with:
36+
# Full git history is needed to get a proper list of changed files within `super-linter`
37+
fetch-depth: 0
38+
39+
- name: "Load super-linter environment file"
40+
run: |
41+
# shellcheck disable=2086
42+
if [ -f "./.github/super-linter.env" ]; then
43+
grep "\S" ./.github/super-linter.env | grep -v "^#"
44+
grep "\S" ./.github/super-linter.env | grep -v "^#" >> $GITHUB_ENV
45+
fi
46+
47+
- name: Lint Code Base
48+
uses: super-linter/super-linter@v7
49+
env:
50+
VALIDATE_ALL_CODEBASE: ${{ inputs.full_scan || false }}
51+
DEFAULT_BRANCH: "main"
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)