feat(ci): comment not supported ci blocks
This commit is contained in:
@@ -9,9 +9,6 @@ on:
|
|||||||
gitea-token:
|
gitea-token:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
github-token:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
|
|
||||||
env: # Comment env block if you don't want to apply fixes
|
env: # Comment env block if you don't want to apply fixes
|
||||||
# Apply linter fixes configuration
|
# Apply linter fixes configuration
|
||||||
@@ -19,26 +16,26 @@ env: # Comment env block if you don't want to apply fixes
|
|||||||
APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all)
|
APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all)
|
||||||
APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request)
|
APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request)
|
||||||
|
|
||||||
concurrency:
|
# concurrency:
|
||||||
group: ${{ github.ref }}-${{ github.workflow }}
|
# group: ${{ github.ref }}-${{ github.workflow }}
|
||||||
cancel-in-progress: true
|
# cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
megalinter:
|
megalinter:
|
||||||
name: MegaLinter
|
name: MegaLinter
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
# permissions:
|
||||||
# Give the default MEGALINTER_TOKEN write permission to commit and push, comment issues & post new PR
|
# # Give the default MEGALINTER_TOKEN write permission to commit and push, comment issues & post new PR
|
||||||
# Remove the ones you do not need
|
# # Remove the ones you do not need
|
||||||
contents: write
|
# contents: write
|
||||||
issues: write
|
# issues: write
|
||||||
pull-requests: write
|
# pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
# Git Checkout
|
# Git Checkout
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.github-token || secrets.gitea-token }}
|
token: ${{ secrets.gitea-token }}
|
||||||
fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances
|
fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances
|
||||||
|
|
||||||
# MegaLinter
|
# MegaLinter
|
||||||
@@ -71,7 +68,7 @@ jobs:
|
|||||||
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
|
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
|
||||||
uses: peter-evans/create-pull-request@v6
|
uses: peter-evans/create-pull-request@v6
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.github-token || secrets.gitea-token }}
|
token: ${{ secrets.gitea-token }}
|
||||||
commit-message: "[MegaLinter] Apply linters automatic fixes"
|
commit-message: "[MegaLinter] Apply linters automatic fixes"
|
||||||
title: "[MegaLinter] Apply linters automatic fixes"
|
title: "[MegaLinter] Apply linters automatic fixes"
|
||||||
labels: bot
|
labels: bot
|
||||||
|
|||||||
Reference in New Issue
Block a user