Skip to content

Release v1.3.3 (#186) #269

Release v1.3.3 (#186)

Release v1.3.3 (#186) #269

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
container: ghcr.io/knight-owl-dev/ci-tools:latest
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Lint
run: make lint
bats:
name: BATS
runs-on: ubuntu-latest
container: ghcr.io/knight-owl-dev/ci-tools:latest
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
# The default BATS_RUNNER docker-runs the ci-tools image for local
# macOS users who may not have bats installed. In CI we're already
# inside that image, so override to run bats directly.
- name: Run BATS tests
run: make test-bats BATS_RUNNER=bats
deb-images:
name: Discover distributable images
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
images: ${{ steps.list.outputs.images }}
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: List distributable images
id: list
run: ./scripts/list-distributable-images.sh
# Builds run on ubuntu-latest (x86_64) for both architectures. The tools
# are bash scripts, so nfpm produces valid debs regardless of host arch.
# Architecture-specific testing happens in test-deb using native runners.
build-deb:
name: Build .deb (${{ matrix.image }}-${{ matrix.arch }})
needs: deb-images
if: ${{ needs.deb-images.outputs.images != '[]' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image: ${{ fromJSON(needs.deb-images.outputs.images) }}
arch: [amd64, arm64]
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
# Version is a placeholder — CI exercises the packaging pipeline,
# not a real release. The publish workflow uses each image's version.
- name: Stage release artifacts
run: ./scripts/${{ matrix.image }}/package-release.sh 0.0.0
- name: Build .deb package
uses: ./.github/actions/build-deb
with:
image: ${{ matrix.image }}
version: 0.0.0
- name: Upload .deb artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: deb-${{ matrix.image }}-${{ matrix.arch }}
path: artifacts/release/*_${{ matrix.arch }}.deb
if-no-files-found: error
test-deb:
name: Test .deb (${{ matrix.image }}-${{ matrix.distro }}-${{ matrix.arch }})
needs: [deb-images, build-deb]
if: ${{ needs.deb-images.outputs.images != '[]' }}
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container }}
strategy:
fail-fast: false
# image (dynamic) x arch x distro; runner and container are attached per
# arch / distro via include (these merge into matching combinations, so no
# extra jobs are created).
matrix:
image: ${{ fromJSON(needs.deb-images.outputs.images) }}
arch: [amd64, arm64]
distro: [debian, ubuntu]
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
- distro: debian
container: debian:bookworm
- distro: ubuntu
container: ubuntu:24.04
steps:
- name: Checkout (for verify script)
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
sparse-checkout: scripts
sparse-checkout-cone-mode: false
- name: Download .deb artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: deb-${{ matrix.image }}-${{ matrix.arch }}
path: deb
- name: Verify installation
run: ./scripts/${{ matrix.image }}/verify-deb-install.sh ./deb/*_${{ matrix.arch }}.deb