-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Yurii Shynbuiev <[email protected]>
- Loading branch information
1 parent
242b7f3
commit 5aa403c
Showing
1 changed file
with
19 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ name: MegaLinter | |
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: # Comment env block if you don't want to apply fixes | ||
# Apply linter fixes configuration | ||
|
@@ -26,12 +27,13 @@ jobs: | |
pull-requests: write | ||
|
||
steps: | ||
# Git Chekcout | ||
# Git Checkout | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- name: MegaLinter | ||
id: ml | ||
|
@@ -47,16 +49,29 @@ jobs: | |
mega-linter.log | ||
overwrite: true | ||
|
||
- uses: crazy-max/ghaction-import-gpg@v3 | ||
id: import_gpg | ||
with: | ||
gpg-private-key: ${{ secrets.HYP_BOT_GPG_PRIVATE }} | ||
passphrase: ${{ secrets.HYP_BOT_GPG_PASSWORD }} | ||
git-user-signingkey: true | ||
git-commit-gpgsign: true | ||
git_config_global: true | ||
git_tag_gpgsign: true | ||
|
||
# Create pull request if applicable (for now works only on PR from same repository, not from forks) | ||
- name: Create Pull Request with applied fixes | ||
id: cpr | ||
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 }} | ||
commit-message: "style: Apply linters automatic fixes" | ||
title: "style: Apply linters automatic fixes" | ||
labels: "hyperledger-bot" | ||
commit-message: "style: apply linters automatic fixes" | ||
title: "style: apply linters automatic fixes" | ||
signoff: true | ||
committer: "Hyperledger Bot <[email protected]>" | ||
author: "Hyperledger Bot <[email protected]>" | ||
|
||
- name: Create PR output | ||
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') | ||
run: | | ||
|