Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Commit

Permalink
feat: add a bluefin-framework image (ublue-os#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoceppi authored Jun 19, 2023
1 parent 3da9f6b commit 6439034
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@ jobs:
fail-fast: false
matrix:
image_flavor: [main, nvidia]
base_name: [bluefin, bluefin-dx, bluefin-dx-framework]
base_name: [bluefin, bluefin-dx, bluefin-framework, bluefin-dx-framework]
major_version: [37, 38]
exclude:
- base_name: bluefin-dx-framework
image_flavor: nvidia
major_version: [37, 38]
- base_name: bluefin-framework
image_flavor: nvidia
include:
- base_name: bluefin-framework
target_base: bluefin
target_name: framework
- base_name: bluefin-dx-framework
target_base: bluefin-dx
target_name: framework
- major_version: 37
is_latest_version: false
is_stable_version: false
Expand Down Expand Up @@ -109,6 +117,20 @@ jobs:
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/bluefin/bluefin/README.md
io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/120078124?s=200&v=4
# Update FROM lines for variants that have their own matrix via SED
# This is due to limitations in buildah using interpreted values as registry
# images and not image targets in file:
# `FROM ${TARGET_BASE} as framework`
# evalutates to `FROM bluefin as framework` but buildah then looks for quay.io/bluefin
# vs the existing containerfile target.
# TODO(GH-280): Find an alternative for this rather than using sed.
- name: Build Image
id: sed_workaround
if: matrix.target_base
shell: bash
run: |
sed -i 's/FROM bluefin AS bluefin-framework/FROM ${{ matrix.target_base }} AS ${{ matrix.base_name }}/' Containerfile
# Build image using Buildah action
- name: Build Image
id: build_image
Expand All @@ -123,8 +145,12 @@ jobs:
IMAGE_NAME=${{ env.IMAGE_NAME }}
IMAGE_FLAVOR=${{ matrix.image_flavor }}
FEDORA_MAJOR_VERSION=${{ matrix.major_version }}
TARGET_BASE=${{ matrix.target_base }}
labels: ${{ steps.meta.outputs.labels }}
oci: false
# TODO(GH-280)
# extra-args: |
# --target=${{ matrix.target_name || matrix.base_name }}
extra-args: |
--target=${{ matrix.base_name }}
Expand Down
3 changes: 2 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-main}"
ARG SOURCE_IMAGE="${SOURCE_IMAGE:-$BASE_IMAGE_NAME-$IMAGE_FLAVOR}"
ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-37}"
ARG TARGET_BASE="${TARGET_BASE:-bluefin}"

FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS bluefin

Expand Down Expand Up @@ -88,7 +89,7 @@ RUN rm -rf /tmp/* /var/*
RUN ostree container commit

# Image for Framework laptops
FROM bluefin-dx as bluefin-dx-framework
FROM bluefin AS bluefin-framework

COPY framework/usr /usr

Expand Down

0 comments on commit 6439034

Please sign in to comment.