diff --git a/.github/workflows/misspell.yml b/.github/workflows/misspell.yml deleted file mode 100644 index 8abecd0..0000000 --- a/.github/workflows/misspell.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: misspell -on: [pull_request] - -jobs: - misspell: - name: check / misspell - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: misspell - uses: reviewdog/action-misspell@v1 - with: - github_token: ${{ secrets.github_token }} - reporter: github-pr-review - fail_on_error: true - locale: "US" diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml new file mode 100644 index 0000000..90f66d6 --- /dev/null +++ b/.github/workflows/reviewdog.yml @@ -0,0 +1,43 @@ +name: reviewdog +on: [pull_request] + +jobs: + misspell: + name: check / misspell + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: misspell + uses: reviewdog/action-misspell@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + fail_on_error: true + locale: "US" + + shellcheck: + name: runner / shellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: shellcheck + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + path: "." + pattern: "*.sh" + exclude: "./.git/*" + + yamllint: + name: check / yamllint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: yamllint + uses: reviewdog/action-yamllint@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + fail_on_error: true + yamllint_flags: '-d "{extends: default, rules: {truthy: disable}}" .' diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml deleted file mode 100644 index dc57203..0000000 --- a/.github/workflows/shellcheck.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: shellcheck -on: [pull_request] - -jobs: - shellcheck: - name: runner / shellcheck - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: shellcheck - uses: reviewdog/action-shellcheck@v1 - with: - github_token: ${{ secrets.github_token }} - reporter: github-pr-review - path: "." - pattern: "*.sh" - exclude: "./.git/*" - diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml deleted file mode 100644 index 539d49e..0000000 --- a/.github/workflows/yamllint.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: yamllint -on: [pull_request] - -jobs: - yamllint: - name: check / yamllint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: yamllint - uses: reviewdog/action-yamllint@v1 - with: - github_token: ${{ secrets.github_token }} - reporter: github-pr-review - fail_on_error: true - yamllint_flags: '-d "{extends: default, rules: {truthy: disable}}" .' diff --git a/README.md b/README.md index 422f15f..10a7a3b 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ With `reporter: github-pr-review` a comment is added to the Pull Request Convers ### `github_token` -**Required**. Must be in form of `github_token: ${{ secrets.github_token }}`'. +`GITHUB_TOKEN`. Default is `${{ github.token }}`. ### `rubocop_version` @@ -116,7 +116,6 @@ jobs: with: rubocop_version: gemfile rubocop_extensions: rubocop-rails:gemfile rubocop-rspec:gemfile - github_token: ${{ secrets.github_token }} reporter: github-pr-review # Default is github-pr-check ``` diff --git a/action.yml b/action.yml index 54f9a27..4082e72 100644 --- a/action.yml +++ b/action.yml @@ -4,7 +4,7 @@ author: 'mgrachev (reviewdog)' inputs: github_token: description: 'GITHUB_TOKEN' - required: true + default: ${{ github.token }} rubocop_version: description: 'Rubocop version' rubocop_extensions: