Run other action after fixes were committed #2958
-
Hi, maybe one of the avid users here knows what to do: I have required tests in my branch protection rules. If MegaLinter does not apply any fixes, everything works as expected. If MegaLinter applies fixes, the tests are not run.
trigger to run the test after megalinter finished but it does not work. I also tried giving megalinter the actions permission because I thought maybe then MegaLinter will also be able to trigger the test action via its commit. Still, no luck. Is here anyone else who experienced this issue? I would appreciate hints on how to solve this problem. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
GitHub doesn't allow bots to trigger workflows for security reasons and to prevent infinite loops. We run MegaLinter as a pre-commit hook instead and don't push automatic fixes when running MegaLinter in CI. You could alternatively pull down the changes MegaLinter made, squash them into the appropriate commits, and force-push the branch. You could also trigger the test workflow with a PAT, although that will make your CI pipeline more vulnerable to attackers. |
Beta Was this translation helpful? Give feedback.
-
@FlorianPfaff the only way to trigger again jobs is to define a Personal Access Token and store it in PAT value You can see how to configure it in MegaLinter documentation :) -> https://megalinter.io/latest/config-apply-fixes/#apply-fixes-issues |
Beta Was this translation helpful? Give feedback.
@FlorianPfaff the only way to trigger again jobs is to define a Personal Access Token and store it in PAT value
You can see how to configure it in MegaLinter documentation :) -> https://megalinter.io/latest/config-apply-fixes/#apply-fixes-issues