Merge pull request #351 from nvuillam/patch-1
Update mega-linter.yml to manage permissions & trigger workflows after autocommitpull/352/head
commit
1b58c02982
|
@ -7,7 +7,7 @@ on:
|
|||
# Trigger mega-linter at every push. Action will also be visible from Pull Requests to main
|
||||
#push: # Comment this line to trigger action only on pull-requests (not recommended if you don't pay for GH Actions)
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
@ -28,13 +28,15 @@ jobs:
|
|||
build:
|
||||
name: MegaLinter
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: megalinter
|
||||
continue-on-error: true
|
||||
steps:
|
||||
# Git Checkout
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
|
||||
fetch-depth: 0
|
||||
|
||||
# MegaLinter
|
||||
|
@ -70,7 +72,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@v5
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
|
||||
commit-message: "[MegaLinter] Apply linters automatic fixes"
|
||||
title: "[MegaLinter] Apply linters automatic fixes"
|
||||
labels: bot
|
||||
|
|
Loading…
Reference in New Issue