Skip to content

Commit

Permalink
build: Don't re-run Mega Linter on main branch (only PRs)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Vorburger <mike@vorburger.ch>
  • Loading branch information
vorburger committed Nov 2, 2023
1 parent cec1682 commit cd57ec4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/mega-linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
# see https://megalinter.io/latest/mega-linter-vs-super-linter/
name: MegaLinter

# Trigger mega-linter at every push.
# Action will also be visible from Pull Requests to main
on:
push:
# DO NOT run on push: but only on Pull Requests
# As this repository is configured to enforce "never push directly to main"
# (it would say: [remote rejected] main -> main (protected branch hook declined)),
# there doesn't seem to be a point to re-run Mega Linter after PRs are merged.
# One reason to change this could be to configure this to let it raise PRs to
# apply fixes to main, but the overall workflow for that isn't very clear
# to me yet, because PRs would still be red, so... ?

pull_request:
branches:
- main
- master

# Comment env block if you do not want to apply fixes
env:
# Apply linter fixes configuration
#
# When active, APPLY_FIXES must also be defined as environment variable
# (in github/workflows/mega-linter.yml or other CI tool)
APPLY_FIXES: all

# Decide which event triggers application of fixes in a commit or a PR
Expand Down

0 comments on commit cd57ec4

Please sign in to comment.