Skip to content

osbuild/image-builder-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Build OS images in GitHub Actions using image-builder

This GitHub Action builds OS images using the image-builder-cli container to build operating system artifacts (disk images, ISOs, etc.)

Prerequisites

  • Building images requires privileges, so make sure that you are not running the job triggering this action in a container.
  • podman has to be installed (it is available on the hosted GitHub runners)

Inputs

Run podman run --rm --privileged ghcr.io/osbuild/image-builder-cli:latest list-images to get the matrix of valid distributions and image types.

  • distro (string, required): The Linux distribution version to build for. Example: fedora-41.

  • image_type (string, required): The type of image to build. Example: qcow2.

  • image_build_ref (string, optional) A reference to the image-builder container image to use for the build. Default: ghcr.io/osbuild/image-builder-cli:latest

Example Workflow

Below is an example of how you might use this action in a GitHub workflow:

name: Build a Fedora 41 minimal raw image

on:
  push:
    branches: [ main ]
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Run Image Builder Action
        uses: osbuild/image-builder-action@v1
        with:
          distro: fedora-41
          image_type: minimal-raw

      - name: Upload Build Artifact
        uses: actions/upload-artifact@v4
        with:
          name: os-image
          path: output/fedora-41-minimal-raw-x86_64/xz/disk.raw.xz

Project

License

  • Apache-2.0
  • See LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published