feat(ci): comment not supported ci blocks

This commit is contained in:
2024-06-17 14:21:20 +03:00
parent 170230ce9f
commit fc4d834738

View File

@@ -9,9 +9,6 @@ on:
gitea-token:
required: true
type: string
github-token:
required: false
type: string
env: # Comment env block if you don't want to apply fixes
# 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_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request)
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
# concurrency:
# group: ${{ github.ref }}-${{ github.workflow }}
# cancel-in-progress: true
jobs:
megalinter:
name: MegaLinter
runs-on: ubuntu-latest
permissions:
# Give the default MEGALINTER_TOKEN write permission to commit and push, comment issues & post new PR
# Remove the ones you do not need
contents: write
issues: write
pull-requests: write
# permissions:
# # Give the default MEGALINTER_TOKEN write permission to commit and push, comment issues & post new PR
# # Remove the ones you do not need
# contents: write
# issues: write
# pull-requests: write
steps:
# Git Checkout
- name: Checkout Code
uses: actions/checkout@v4
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
# 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')
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.github-token || secrets.gitea-token }}
token: ${{ secrets.gitea-token }}
commit-message: "[MegaLinter] Apply linters automatic fixes"
title: "[MegaLinter] Apply linters automatic fixes"
labels: bot