🔨 Build #8
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" | |
on: | |
workflow_dispatch: | |
inputs: | |
testOnly: | |
description: "Run tests only?" | |
required: true | |
type: boolean | |
default: false | |
workflow_call: | |
inputs: | |
testOnly: | |
description: "Run tests only?" | |
type: boolean | |
default: false | |
concurrency: "build" | |
jobs: | |
install: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "📥 Checkout code" | |
uses: actions/checkout@v4 | |
- name: "🔧 Setup node" | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "yarn" | |
- name: "📦 Install dependencies" | |
uses: ./.github/actions/install | |
lint: | |
runs-on: ubuntu-latest | |
needs: [ install ] | |
steps: | |
- name: "📥 Checkout code" | |
uses: actions/checkout@v4 | |
- name: "🔧 Setup node" | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "yarn" | |
- name: "📦 Install dependencies" | |
uses: ./.github/actions/install | |
- name: "🔨 Lint" | |
run: yarn lint | |
test: | |
runs-on: ubuntu-latest | |
needs: [ install ] | |
if: false | |
steps: | |
- name: "📥 Checkout code" | |
uses: actions/checkout@v4 | |
- name: "🔧 Setup node" | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "yarn" | |
- name: "💽 Restore node_modules cache" | |
uses: reactgular/cache@v1 | |
with: | |
mode: "restore" | |
- name: "🔨 Test" | |
run: ${{ env.NX }} affected -t test | |
storybooks: | |
runs-on: ubuntu-latest | |
needs: [ install ] | |
if: false | |
steps: | |
- name: "📥 Checkout code" | |
uses: actions/checkout@v4 | |
- name: "🔧 Setup node" | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "yarn" | |
- name: "📦 Install dependencies" | |
uses: ./.github/actions/install | |
- name: "🔨 Build storybooks" | |
run: yarn build-storybook | |
build: | |
runs-on: ubuntu-latest | |
needs: [ install ] | |
if: ${{ github.event.inputs.testOnly == false }} | |
steps: | |
- name: "📥 Checkout code" | |
uses: actions/checkout@v4 | |
- name: "🔧 Setup node" | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "yarn" | |
- name: "📦 Install dependencies" | |
uses: ./.github/actions/install | |
- name: "💽 Restore .next/cache cache" | |
uses: ./.github/actions/next-cache | |
- name: "🔨 Build" | |
run: yarn build |