Build smolBSD image #30
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 smolBSD image | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
img: | |
description: "Image target" | |
required: true | |
default: "rescue" | |
arch: | |
description: "Architecture" | |
required: true | |
default: "amd64" | |
svcimg: | |
description: "Image builder service" | |
required: false | |
default: | |
mountro: | |
description: "Build as read-only (y or empty)" | |
required: false | |
default: | |
curlsh: | |
description: "URL to a script to execute as finalizer" | |
required: false | |
default: | |
jobs: | |
build_img: | |
runs-on: ubuntu-latest | |
container: | |
image: debian:latest | |
options: --privileged | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up environment | |
run: | | |
apt update && apt install -y curl xz-utils make sudo git | |
rm -rf /var/cache | |
- name: Build image | |
run: | | |
make NOSVCIMGBUILD=yes SVCIMG=${{ inputs.svcimg }} CURLSH=${{ inputs.curlsh }} ARCH=${{ inputs.arch || 'amd64' }} MOUNTRO=${{ inputs.mountro }} ${{ inputs.img || 'rescue' }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: image | |
path: "*.img" |