ci(megalinter): add github action #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MegaLinter GitHub Action configuration file | |
# More info at https://megalinter.io | |
--- | |
name: MegaLinter | |
on: # yamllint disable-line rule:truthy - false positive | |
push: | |
pull_request: | |
branches: | |
- main | |
- master | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
permissions: # added using https://github.com/step-security/secure-repo | |
contents: read | |
jobs: | |
megalinter: | |
name: MegaLinter | |
runs-on: ubuntu-latest | |
steps: | |
# Git Checkout | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} | |
# MegaLinter | |
- name: MegaLinter | |
uses: oxsecurity/megalinter@v8 | |
id: megalinter | |
env: | |
VALIDATE_ALL_CODEBASE: true | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Upload MegaLinter artifacts | |
- name: Archive production artifacts | |
if: success() || failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: MegaLinter reports | |
path: | | |
megalinter-reports | |
mega-linter.log |