Skip to content

Bump anchore/sbom-action from 0.23.1 to 0.24.0 (#3002) #1163

Bump anchore/sbom-action from 0.23.1 to 0.24.0 (#3002)

Bump anchore/sbom-action from 0.23.1 to 0.24.0 (#3002) #1163

Workflow file for this run

name: lint
on:
push:
branches:
- main
- release/*
paths-ignore:
- '**/*.gitattributes'
- '**/*.gitignore'
- '**/*.md'
pull_request:
workflow_dispatch:
permissions: {}
jobs:
lint:
runs-on: ubuntu-latest
env:
FORCE_COLOR: 3
POWERSHELL_YAML_VERSION: '0.4.12'
PSSCRIPTANALYZER_VERSION: '1.24.0'
TERM: xterm
ZIZMOR_VERSION: '1.23.1'
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
filter: 'tree:0'
persist-credentials: false
show-progress: false
- name: Add actionlint problem matcher
run: echo "::add-matcher::.github/actionlint-matcher.json"
- name: Lint workflows with actionlint
uses: docker://rhysd/actionlint:1.7.7@sha256:887a259a5a534f3c4f36cb02dca341673c6089431057242cdc931e9f133147e9
with:
args: -color
- name: Lint workflows with zizmor
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
with:
persona: pedantic
version: ${{ env.ZIZMOR_VERSION }}
- name: Lint PowerShell in workflows
uses: martincostello/lint-actions-powershell@e088367ebeb113cd7c1ebee5c541175d93e945b7 # v1.0.1
with:
powershell-yaml-version: ${{ env.POWERSHELL_YAML_VERSION }}
psscriptanalyzer-version: ${{ env.PSSCRIPTANALYZER_VERSION }}
treat-warnings-as-errors: true
- name: Lint PowerShell scripts
shell: pwsh
run: |
$settings = @{
IncludeDefaultRules = $true
Severity = @("Error", "Warning")
}
$issues = Invoke-ScriptAnalyzer -Path ${env:GITHUB_WORKSPACE} -Recurse -ReportSummary -Settings $settings
foreach ($issue in $issues) {
$severity = $issue.Severity.ToString()
$level = $severity.Contains("Error") ? "error" : $severity.Contains("Warning") ? "warning" : "notice"
Write-Output "::${level} file=$($issue.ScriptName),line=$($issue.Line),title=PSScriptAnalyzer::$($issue.Message)"
}
if ($issues.Count -gt 0) {
exit 1
}