-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the mega linter because of GitHub Action deprecations #2877
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,42 +1,17 @@ | ||
--- | ||
# MegaLinter GitHub Action configuration file | ||
# More info at https://megalinter.github.io | ||
# More info at https://oxsecurity.github.io/megalinter | ||
name: mega-linter-yaml | ||
|
||
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: | ||
|
||
env: # Comment env block if you do not want to apply fixes | ||
APPLY_FIXES: none # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool) | ||
|
||
jobs: | ||
build: | ||
name: mega-linter-yaml | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Git Checkout | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
# MegaLinter | ||
uses: actions/checkout@v3 | ||
- name: yamllint | ||
id: ml | ||
# You can override MegaLinter flavor used to have faster performances | ||
# More info at https://megalinter.github.io/flavors/ | ||
uses: megalinter/megalinter/flavors/ci_light@v5 | ||
env: | ||
# All available variables are described in documentation | ||
# https://megalinter.github.io/configuration/ | ||
VALIDATE_ALL_CODEBASE: true | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY | ||
# DISABLE: COPYPASTE,SPELL # Uncomment to disable copy-paste and spell checks | ||
ENABLE_LINTERS: YAML_YAMLLINT | ||
# YAML_YAMLLINT_CONFIG_FILE: .yaml-lint.yml | ||
# YAML_YAMLLINT_RULES_PATH: .github/linters | ||
PRINT_ALPACA: false | ||
uses: oxsecurity/megalinter/flavors/ci_light@v6 |
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
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 |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# Configuration file for MegaLinter | ||
# See all available variables at https://megalinter.github.io/configuration/ and in linters documentation | ||
# See all available variables at https://oxsecurity.github.io/megalinter/configuration/ and in linters documentation | ||
|
||
APPLY_FIXES: none | ||
# ENABLE: # If you use ENABLE variable, all other languages/formats/tooling formats will be disabled by default | ||
ENABLE_LINTERS: | ||
- YAML_YAMLLINT # If you use ENABLE_LINTERS variable, all other linters will be disabled by default | ||
- YAML_YAMLLINT | ||
EXCLUDED_DIRECTORIES: | ||
- vendor | ||
- "vendor" | ||
- "node_modules" | ||
YAML_YAMLLINT_CONFIG_FILE: .yaml-lint.yml | ||
LINTER_RULES_PATH: . | ||
PRINT_ALPACA: false | ||
GITHUB_STATUS_REPORTER: false | ||
GITHUB_COMMENT_REPORTER: false | ||
VALIDATE_ALL_CODEBASE: true |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just noticing that the file edited in this PR and this reference do not align. Am I missing something or is this a typo from a previous commit? The new linter seems to use a different default, one that would work if we actually removed this "custom" one: https://megalinter.io/latest/descriptors/yaml_yamllint/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the path is still different, dunno why we have that name in particular. I'm not too keen to change it if it works :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OH, right. This yaml-lint is for the yaml-lint config in the proj root dir, the one changed in the PR is for the yaml linting GH action.