Skip to content

Build

Build #6672

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
branches: [main, '[0-9]+-[0-9]+-*']
workflow_dispatch:
workflow_call:
workflow_run:
workflows: ['Dependabot']
branches-ignore: ['workflows/tests/*']
types:
- completed
jobs:
build:
name: Build
if: ${{ !startsWith(github.head_ref, 'workflows/tests/') }}
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/create-github-app-token@v1
id: get-github-app-token
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
with:
app-id: ${{ secrets.CHECK_GIT_STATUS_BOT_APP_ID }}
private-key: ${{ secrets.CHECK_GIT_STATUS_BOT_APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.head_ref }}
token: ${{ steps.get-github-app-token.outputs.token || github.token }}
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
check-latest: true
cache: yarn
- name: Install dependencies
run: yarn
- name: Reformat
run: |
yarn prettier --write .
yarn lint --fix
- name: Build
run: yarn build
- name: Bundle
run: yarn bundle
- uses: CatChen/check-git-status-action@v1
id: check-git-status
with:
fail-if-not-clean: ${{ github.actor != 'dependabot[bot]' || github.actor_id != 49699333 }}
push-if-not-clean: true
request-changes-if-not-clean: false
push-token: ${{ steps.get-github-app-token.outputs.token || github.token }}