Skip to content

build

build #2349

Workflow file for this run

name: build
on:
push:
branches:
- main
pull_request:
merge_group:
schedule:
- cron: '0 1 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref_name }}
cancel-in-progress: true
env:
HUSKY: 0
jobs:
lint:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: corepack enable
- run: pnpm install
- run: pnpm prettier
build:
needs:
- lint
runs-on: ${{ matrix.arch.os }}
name: build (${{ matrix.arch.name }})
permissions:
contents: write
strategy:
fail-fast: false
matrix:
arch:
- name: x86_64
os: ubuntu-24.04
- name: aarch64
os: ubuntu-24.04-arm
env:
ARCH: ${{ matrix.arch.name }} # build target, name required by binary-builder
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: binary-builder
uses: containerbase/internal-tools@4453842226e67bc5d507c41b21184cc9220f4974 # v3.5.19
with:
command: binary-builder
dry-run: ${{github.ref_name != 'main'}}
token: ${{ secrets.GITHUB_TOKEN }}
success:
runs-on: ubuntu-24.04
needs:
- lint
- build
timeout-minutes: 1
if: always()
steps:
- name: Fail for failed or cancelled build
if: |
needs.build.result == 'failure' ||
needs.build.result == 'cancelled'
run: exit 1
- name: Fail for failed or cancelled lint
if: |
needs.lint.result == 'failure' ||
needs.lint.result == 'cancelled'
run: exit 1