Skip to content

Commit 2078fba

Browse files
committed
ci: remove non-verified actions from megalinter github workflow
Signed-off-by: Alan Wandke <[email protected]>
1 parent 6abff9e commit 2078fba

File tree

1 file changed

+34
-32
lines changed

1 file changed

+34
-32
lines changed

.github/workflows/mega-linter.yml

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ on:
99
pull_request:
1010
branches: [main]
1111

12-
env: # Comment env block if you don't want to apply fixes
13-
# Apply linter fixes configuration
14-
APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool)
15-
APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all)
16-
APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request)
12+
# TODO: uncomment if non-verified actions are allowed at a later point
13+
# env: # Comment env block if you don't want to apply fixes
14+
# # Apply linter fixes configuration
15+
# APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool)
16+
# APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all)
17+
# APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request)
1718

1819
concurrency:
1920
group: ${{ github.ref }}-${{ github.workflow }}
@@ -49,31 +50,32 @@ jobs:
4950
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Validates all source when push on main, else just the git diff with main. Override with true if you always want to lint all sources
5051
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5152

52-
# Create pull request if applicable (for now works only on PR from same repository, not from forks)
53-
- name: Create Pull Request with applied fixes
54-
id: cpr
55-
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')
56-
uses: peter-evans/create-pull-request@v6
57-
with:
58-
token: ${{ secrets.GITHUB_TOKEN }}
59-
commit-message: "[MegaLinter] Apply linters automatic fixes"
60-
title: "[MegaLinter] Apply linters automatic fixes"
61-
labels: bot
62-
- name: Create PR output
63-
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')
64-
run: |
65-
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
66-
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
53+
# TODO: uncomment if non-verified actions are allowed at a later point
54+
# # Create pull request if applicable (for now works only on PR from same repository, not from forks)
55+
# - name: Create Pull Request with applied fixes
56+
# id: cpr
57+
# 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')
58+
# uses: peter-evans/create-pull-request@v6
59+
# with:
60+
# token: ${{ secrets.GITHUB_TOKEN }}
61+
# commit-message: "[MegaLinter] Apply linters automatic fixes"
62+
# title: "[MegaLinter] Apply linters automatic fixes"
63+
# labels: bot
64+
# - name: Create PR output
65+
# 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')
66+
# run: |
67+
# echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
68+
# echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
6769

68-
# Push new commit if applicable (for now works only on PR from same repository, not from forks)
69-
- name: Prepare commit
70-
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
71-
run: sudo chown -Rc $UID .git/
72-
- name: Commit and push applied linter fixes
73-
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
74-
uses: stefanzweifel/git-auto-commit-action@v4
75-
with:
76-
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
77-
commit_message: "[MegaLinter] Apply linters fixes"
78-
commit_user_name: megalinter-bot
79-
commit_user_email: [email protected]
70+
# # Push new commit if applicable (for now works only on PR from same repository, not from forks)
71+
# - name: Prepare commit
72+
# if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
73+
# run: sudo chown -Rc $UID .git/
74+
# - name: Commit and push applied linter fixes
75+
# if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
76+
# uses: stefanzweifel/git-auto-commit-action@v4
77+
# with:
78+
# branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
79+
# commit_message: "[MegaLinter] Apply linters fixes"
80+
# commit_user_name: megalinter-bot
81+
# commit_user_email: [email protected]

0 commit comments

Comments
 (0)