Update README.md #120
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: Validate code style | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- synchronize | |
- reopened | |
concurrency: | |
group: style_${{ github.event.pull_request.number }} | |
cancel-in-progress: true | |
jobs: | |
style: | |
name: Code style validations | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: write | |
checks: write | |
steps: | |
- name: Checkout repo | |
uses: 'actions/checkout@v3' | |
- name: Configure Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Retrieve npm cache | |
uses: 'actions/cache@v3' | |
with: | |
path: ${{ github.workspace }}/node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install Node packages | |
run: npm install && npm ci | |
- name: Get changed files | |
id: changes | |
run: | | |
echo "::set-output name=files::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep .handlebars$ | xargs)" | |
- uses: EPMatt/reviewdog-action-prettier@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-pr-check | |
level: warning | |
- uses: reviewdog/action-eslint@v1 | |
with: | |
reporter: github-pr-check | |
eslint_flags: '${{ github.workspace }}/lib/**/*.js ${{ github.workspace }}/routes/**/*.js ${{ github.workspace }}/public/**/*.js' | |
# test |