-
-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inline required workflows for GHA (#895)
* Create github-actions-lint.yml * Create yaml-lint.yml * Create rubocop.yml
- Loading branch information
1 parent
cce444a
commit ed65a5f
Showing
3 changed files
with
89 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: GitHub Actions Lint | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
github_actions_lint: | ||
name: Run actionlint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: tj-actions/changed-files@v41 | ||
id: changed-files | ||
with: | ||
files: | | ||
.github/workflows/*.yaml | ||
.github/workflows/*.yml | ||
- uses: reviewdog/action-actionlint@v1 | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
fail_on_error: true | ||
filter_mode: nofilter # added (default), diff_context, file, nofilter | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
reporter: github-pr-check |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Rubocop | ||
|
||
on: | ||
pull_request: | ||
|
||
env: | ||
RUBY_VERSION: ${{ vars.RUBOCOP_RUBY_VERSION || '3.2' }} | ||
|
||
jobs: | ||
rubocop: | ||
name: Run rubocop | ||
runs-on: ubuntu-latest | ||
env: | ||
BUNDLE_ONLY: ${{ vars.RUBOCOP_BUNDLE_ONLY || 'rubocop' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: tj-actions/changed-files@v41 | ||
id: changed-files | ||
with: | ||
files: | | ||
.github/workflows/rubocop.yml | ||
.rubocop.yml | ||
**.rb | ||
bin/* | ||
gemfiles/**/Gemfile | ||
Gemfile* | ||
Rakefile | ||
*.gemspec | ||
- uses: ruby/setup-ruby@v1 | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
ruby-version: ${{ env.RUBY_VERSION }} | ||
bundler-cache: true | ||
- uses: reviewdog/action-rubocop@v2 | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
fail_on_error: true | ||
filter_mode: nofilter # added (default), diff_context, file, nofilter | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
skip_install: true | ||
use_bundler: true |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: YAML Lint | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
yaml_lint: | ||
name: Run yamllint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: tj-actions/changed-files@v41 | ||
id: changed-files | ||
with: | ||
files: | | ||
**.yaml | ||
**.yml | ||
- uses: reviewdog/action-yamllint@v1 | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
fail_on_error: true | ||
filter_mode: nofilter # added (default), diff_context, file, nofilter | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
reporter: github-pr-check |