Improve Communities page SSR #5857
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: "Static analysis" | |
on: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
get-node-version: | |
name: Get Node version | |
if: ( | |
github.event_name != 'pull_request' && ( | |
github.event_name != 'push' || | |
github.actor != 'dependabot[bot]' | |
) | |
) || ( | |
github.event_name == 'pull_request' && ( | |
github.event.base.repo.id != github.event.head.repo.id || | |
github.actor == 'dependabot[bot]' | |
) | |
) | |
runs-on: ubuntu-latest | |
outputs: | |
node-version: ${{ steps.get-node-version.outputs.node-version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Check get-node-version version | |
uses: ./.github/actions/get-node-version | |
with: | |
package-json: .github/actions/get-node-version/package.json | |
- name: Get Node version | |
id: get-node-version | |
uses: ./.github/actions/get-node-version | |
eslint: | |
name: ESLint | |
needs: get-node-version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ needs.get-node-version.outputs.node-version }} | |
- name: Set fontawesome token | |
run: | | |
npm config set "@fortawesome:registry" https://npm.fontawesome.com/ | |
npm config set "//npm.fontawesome.com/:_authToken" ${{ secrets.NPM_FA_TOKEN }} | |
- name: Install yarn dependencies | |
run: yarn install | |
- name: Run ESLint | |
run: yarn run eslint apps packages -f node_modules/@microsoft/eslint-formatter-sarif/sarif.js -o results.sarif || ":" | |
- name: Upload SARIF | |
uses: github/codeql-action/upload-sarif@v1 | |
with: | |
sarif_file: results.sarif | |
codeql: | |
name: CodeQL | |
if: ( | |
github.event_name != 'pull_request' && ( | |
github.event_name != 'push' || | |
github.actor != 'dependabot[bot]' | |
) | |
) || ( | |
github.event_name == 'pull_request' && ( | |
github.event.base.repo.id != github.event.head.repo.id || | |
github.actor == 'dependabot[bot]' | |
) | |
) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v1 | |
with: | |
languages: javascript | |
- name: CodeQL analysis | |
uses: github/codeql-action/analyze@v1 |