[ImgBot] Optimize images #42
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: | |
push: | |
paths-ignore: | |
- '**.md' | |
env: | |
NODE_VERSION: '20.x' # Changed to a version pattern in case you want to use the latest v20 release. | |
jobs: | |
checkout-setup: | |
name: π Checkout and Setup | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
outputs: | |
cache-key: ${{ steps.cache.outputs.cache-key }} | |
steps: | |
- name: β€΅οΈ Checkout repository | |
uses: actions/checkout@v4.1.1 | |
- name: π Setup nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: π Setup nodejs corepack | |
run: corepack enable | |
- name: π Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: β¬οΈ Get yarn config | |
id: yarn_config | |
run: echo "cache-folder=$(yarn config get cacheFolder)" >> $GITHUB_ENV | |
- name: π Cache node_modules | |
id: cache | |
uses: actions/cache@v3.3.2 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
/tmp/.buildx-cache | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-yarn- | |
lint: | |
name: π ESLint Scanning | |
runs-on: ubuntu-latest | |
needs: checkout-setup | |
steps: | |
- name: β€΅οΈ Checkout repository | |
uses: actions/checkout@v4.1.1 | |
- name: π Install dependencies | |
run: yarn install --immutable | |
- name: π¨ Lint All Projects | |
run: yarn lint:all | |
typescript: | |
name: π Build Typescript | |
runs-on: ubuntu-latest | |
needs: checkout-setup | |
steps: | |
- name: β€΅οΈ Checkout repository | |
uses: actions/checkout@v4.1.1 | |
- name: π Install dependencies | |
run: yarn install --immutable | |
- name: π¨ Build All Projects | |
run: yarn build:all | |
test: | |
name: π Unit Test | |
runs-on: ubuntu-latest | |
needs: checkout-setup | |
steps: | |
- name: β€΅οΈ Checkout repository | |
uses: actions/checkout@v4.1.1 | |
- name: π Install dependencies | |
run: yarn install --immutable | |
- name: β Unit Test All Projects | |
run: yarn test:all |