mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-11 18:26:50 +00:00
This is already the default for forked PRs, and most (if not all) PRs to this repository come from forks anyways.
31 lines
841 B
YAML
31 lines
841 B
YAML
name: Linters
|
|
on: [pull_request]
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
jobs:
|
|
lint:
|
|
name: reviewdog
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version-file: .node-version
|
|
- name: Install JS dependencies
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
|
|
- run: git show --no-patch # the commit being tested (which is often a merge due to actions/checkout@v3)
|
|
|
|
- uses: reviewdog/action-setup@v1
|
|
with:
|
|
reviewdog_version: v0.21.0
|
|
|
|
- run: ./script/reviewdog.sh
|
|
env:
|
|
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.github_token }}
|