Skip to content

build

build #2029

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 }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: ⚙️ Setup
uses: containerbase/internal-tools/setup@e49daccce71d5506c63fa4b00540248bb18add27 # v3.8.2
with:
save-cache: true
- run: pnpm prettier
build:
needs:
- lint
runs-on: ${{ matrix.arch.os }}
name: build (${{ matrix.distro }}, ${{ matrix.arch.name }})
continue-on-error: ${{ matrix.distro == 'jammy' }}
strategy:
# some versions are not builable on jammy
fail-fast: false
matrix:
distro:
- focal
- jammy
arch:
- name: x86_64
os: ubuntu-24.04
- name: aarch64
os: ubuntu-24.04-arm
env:
DISTRO: ${{ matrix.distro }} # build target, name required by binary-builder
ARCH: ${{ matrix.arch.name }} # build target, name required by binary-builder
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
show-progress: false
- name: binary-builder
uses: containerbase/internal-tools@e49daccce71d5506c63fa4b00540248bb18add27 # v3.8.2
with:
command: binary-builder
dry-run: ${{github.ref != 'refs/heads/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