mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-25 05:25:23 -04:00
48c9d5acf8
* chore(workflow): update pull request trigger to only activate on pushes to main * chore(workflow): refine trigger conditions for MegaLinter to activate only on pushes to main
83 lines
2.2 KiB
YAML
83 lines
2.2 KiB
YAML
# MegaLinter GitHub Action configuration file
|
|
# More info at https://megalinter.io
|
|
---
|
|
name: MegaLinter
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
concurrency:
|
|
group: ${{ github.ref }}-${{ github.workflow }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
megalinter:
|
|
name: MegaLinter
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
# Git Checkout
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
# If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to
|
|
# improve performance
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
# MegaLinter
|
|
- name: MegaLinter
|
|
|
|
# You can override MegaLinter flavor used to have faster performances
|
|
# More info at https://megalinter.io/latest/flavors/
|
|
uses: oxsecurity/megalinter@v8
|
|
|
|
id: ml
|
|
|
|
# All available variables are described in documentation
|
|
# https://megalinter.io/latest/configuration/
|
|
env:
|
|
# Validates all source when push on main, else just the git diff with
|
|
# main. Override with true if you always want to lint all sources
|
|
#
|
|
# To validate the entire codebase, set to:
|
|
# VALIDATE_ALL_CODEBASE: true
|
|
#
|
|
# To validate only diff with main, set to:
|
|
# VALIDATE_ALL_CODEBASE: >-
|
|
# ${{
|
|
# github.event_name == 'push' &&
|
|
# contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
|
|
# }}
|
|
VALIDATE_ALL_CODEBASE: >-
|
|
${{
|
|
github.event_name == 'push' &&
|
|
contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
|
|
}}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# Upload MegaLinter artifacts
|
|
- name: Archive production artifacts
|
|
if: success() || failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: MegaLinter reports
|
|
include-hidden-files: "true"
|
|
path: |
|
|
megalinter-reports
|
|
mega-linter.log
|
|
# Check GitHub workflows.
|
|
- name: Install Zizmor
|
|
run: pip install zizmor==1.5.2
|
|
- name: Run Zizmor
|
|
run: zizmor .
|