Skip to content

refactor(ci): restrict workflow permissions to least privilege #205

refactor(ci): restrict workflow permissions to least privilege

refactor(ci): restrict workflow permissions to least privilege #205

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Enable Corepack
run: corepack enable
- name: Select Node Version
uses: svierk/get-node-version@main
with:
package-manager: 'yarn'
- name: Install Dependencies
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command
- name: Check Prettier
run: yarn run prettier
- name: Check ESLint
run: yarn run lint
- name: LWC Unit Tests
run: yarn run test:unit
- name: Build Production Bundle
uses: borales/actions-yarn@v4
with:
cmd: build # will run `yarn build` command