feat: Github Action to enable Checkstyle #29
Workflow file for this run
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
name: reviewdog | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
jobs: | |
greeting: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
pull-requests: write | |
steps: | |
- uses: actions/first-interaction@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
issue-message: "Thank you for contribute by creating an issue" | |
pr-message: "Thank you for contribute with your first pull request" | |
checkstyle: | |
name: runner / checkstyle | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
checks: write | |
steps: | |
- name: Print Specific ENV Variables | |
run: | | |
echo "REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.CHECSTYLE_TOKEN }}" | |
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" | |
- uses: actions/checkout@v4 | |
- name: Run Checkstyle and Reviewdog | |
uses: dbelyaev/action-checkstyle@master | |
env: | |
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.CHECSTYLE_TOKEN }} | |
with: | |
github_token: ${{ secrets.CHECSTYLE_TOKEN }} | |
reporter: github-pr-review | |
checkstyle_config: google_checks.xml | |
fail_on_error: true |