[StepSecurity] Apply security best practices #5193
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: Build Frontend | |
on: | |
pull_request: | |
paths: | |
- "frontend/**" | |
- "Makefile" | |
- ".github/**" | |
- "app/**" | |
- "plugins/**" | |
push: | |
branches: | |
- main | |
paths: | |
- "frontend/**" | |
- Makefile | |
- ".github/**" | |
- "app/**" | |
- "plugins/**" | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
name: lint | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [20.x] | |
os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: frontend/package-lock.json | |
- name: Install dependencies | |
run: | | |
make frontend-install | |
- name: Run linter | |
run: | | |
make frontend-lint | |
test: | |
name: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [20.x] | |
os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: frontend/package-lock.json | |
- name: Install dependencies | |
run: | | |
make frontend-install | |
- name: Run tests | |
run: | | |
make frontend-test | |
build: | |
name: build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [20.x] | |
os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: frontend/package-lock.json | |
- name: Install dependencies | |
run: | | |
make frontend-install | |
- name: Build Frontend | |
run: | | |
make frontend-build | |
testplugins: | |
name: test plugins | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [20.x] | |
os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: frontend/package-lock.json | |
- name: Test plugins | |
run: | | |
make plugins-test | |
builddocs: | |
name: build docs | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [20.x] | |
os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: frontend/package-lock.json | |
- name: Build docs | |
run: | | |
make docs | |
buildstorybook: | |
name: build storybook | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [20.x] | |
os: [ubuntu-22.04] # [windows-latest, ubuntu-latest, macos-latest] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: frontend/package-lock.json | |
- name: Install dependencies | |
run: | | |
make frontend-install | |
- name: Build storybook | |
run: | | |
make frontend-build-storybook |