Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
73 lines (62 loc) · 2.39 KB

File metadata and controls

73 lines (62 loc) · 2.39 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Lint-Repository
on:
workflow_call:
inputs:
Settings:
type: string
description: The settings object as a JSON string.
required: true
permissions:
contents: read # to checkout the repository
statuses: write # to update the status of the workflow from linter
pull-requests: write # to post super-linter summary comments on PRs
jobs:
Lint-Repository:
name: Lint code base
runs-on: ubuntu-latest
env:
Settings: ${{ inputs.Settings }}
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
fetch-depth: 0
- name: Load dynamic envs
shell: pwsh
run: |
Write-Host "Loading settings for super-linter:"
$settings = $env:Settings | ConvertFrom-Json -AsHashtable
$linter = $settings.Linter
$env = $linter.env
foreach ($key in $env.Keys) {
$value = $env[$key]
if ($value -is [bool]) {
$value = $value.ToString().ToLower()
}
Write-Host "$key = $value"
# Persist for following steps in this job
"$key=$value" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
}
- name: Lint code base
id: super-linter
uses: super-linter/super-linter@9e863354e3ff62e0727d37183162c4a88873df41 # v8.6.0
env:
GITHUB_TOKEN: ${{ github.token }}
DEFAULT_WORKSPACE: ${{ fromJson(env.Settings).WorkingDirectory }}
FILTER_REGEX_INCLUDE: ${{ fromJson(env.Settings).WorkingDirectory }}
ENABLE_GITHUB_ACTIONS_STEP_SUMMARY: false
SAVE_SUPER_LINTER_SUMMARY: true
- name: Post super-linter summary
if: failure() || fromJson(env.Settings).Linter.ShowSummaryOnSuccess == true
shell: pwsh
env:
SUPER_LINTER_OUTCOME: ${{ steps.super-linter.outcome }}
run: |
$summaryPath = Join-Path $env:GITHUB_WORKSPACE 'super-linter-output' 'super-linter-summary.md'
Get-Content $summaryPath | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8
$failed = $env:SUPER_LINTER_OUTCOME -eq 'failure'
if ($failed) {
Write-Host "::error::Super-linter found issues. Please review the summary above."
exit 1
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.