Skip to content

added action for trivy #878

added action for trivy

added action for trivy #878

---
name: Execute Super-Linter
on: # yamllint disable-line rule:truthy
push: null
pull_request: null
permissions: {}
jobs:
build:
name: Lint
runs-on: ubuntu-latest
permissions:
# to be able to commit
contents: write
packages: read
# To report GitHub Actions status checks
statuses: write
steps:
- name: Checkout code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0
- name: Run Super-linter
uses: super-linter/super-linter@12150456a73e248bdc94d0794898f94e23127c88 # v7.4.0 # x-release-please-version
env:
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Fixing Lint Errors for JSONC, MARKDOWN_PRETTIER, MARKDOWN and YAML_PRETTIER
FIX_JSONC_PRETTIER: true
FIX_MARKDOWN_PRETTIER: true
FIX_MARKDOWN: true
FIX_YAML_PRETTIER: true
- name: Commit and push linting fixes
# Run only on:
# - Pull requests
# - Not on the default branch
if: >
github.event_name == 'pull_request' &&
github.ref_name != github.event.repository.default_branch
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5.2.0
with:
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
commit_message: "chore: fix linting issues [skip ci]"
commit_user_name: super-linter
commit_user_email: super-linter@super-linter.dev