[pull] main from platformsh:main #712
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: Linting | |
on: | |
pull_request_target: | |
branches: [main] | |
types: [labeled,opened,reopened,synchronize] | |
jobs: | |
lint-markdown: | |
name: Lint markdown | |
if: >- | |
( | |
github.event.pull_request.head.repo.id == 21975579 || | |
contains(github.event.pull_request.labels.*.name, 'build-fork') | |
) && | |
contains(github.event.pull_request.labels.*.name, vars.LBL_MRKDWNPROSE) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
site: ['platform', 'upsun'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
cache-dependency-path: sites/${{ matrix.site }}/package-lock.json | |
- name: Run lint markdown | |
run: | | |
cd sites/${{ matrix.site }} | |
npm ci | |
npm run lint:markdown | |
lint-prose: | |
name: Lint Prose | |
if: >- | |
( | |
github.event.pull_request.head.repo.id == 21975579 || | |
contains(github.event.pull_request.labels.*.name, 'build-fork') | |
) && | |
contains(github.event.pull_request.labels.*.name, vars.LBL_MRKDWNPROSE) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
site: ['platform', 'upsun'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# we need to checkout the PR repo/branch even if it's a fork because the action in the next step needs to | |
# check the markdown from the PR itself. Plus, we're only running this job if a PR from fork has been approved | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Vale | |
uses: errata-ai/vale-action@reviewdog | |
with: | |
version: 3.0.7 | |
fail_on_error: true | |
reporter: github-check | |
files: sites/${{ matrix.site }}/src | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |