Skip to content

Commit

Permalink
feat(linter): add linter-env input
Browse files Browse the repository at this point in the history
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
  • Loading branch information
neilime committed Mar 29, 2024
1 parent 3309c6a commit 6ba6467
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ on:
type: string
default: '["ubuntu-latest"]'
required: false
linter-env:
description: 'Environment variables in multilines format "key=value" to pass to the linter. See https://github.com/super-linter/super-linter.'
type: string
required: false

secrets:
github-token:
description: 'Token for marking the status of linter run in the Checks section. See https://github.com/super-linter/super-linter#how-to-use'
description: "Token for marking the status of linter run in the Checks section. See https://github.com/super-linter/super-linter#how-to-use"

jobs:
checks:
Expand All @@ -26,6 +31,18 @@ jobs:
with:
fetch-depth: 0

- if: ${{ inputs.linter-env }}
run: |
LINTER_ENV=$(cat <<EOF
${{ inputs.linter-env }}
EOF
)
echo "$LINTER_ENV" | while IFS= read -r line; do
if [ -z "$line" ]; then continue; fi
echo "$line" >> "$GITHUB_ENV"
done
- name: 👕 Lint Code Base
uses: super-linter/super-linter/slim@v5
env:
Expand Down

0 comments on commit 6ba6467

Please sign in to comment.