From fe16187a92400865b4f96e82ce4d6781478bdfe6 Mon Sep 17 00:00:00 2001 From: ER Date: Mon, 3 Apr 2023 15:17:16 +0300 Subject: [PATCH] feat: declare base image and fedora ver in recipe --- .github/workflows/build.yml | 5 ++++- Containerfile | 4 ++-- recipe.yml | 9 +++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc014e8f60..1191c675eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,8 @@ jobs: - name: Gather image data from recipe run: | echo "IMAGE_NAME=$(yq '.name' ./recipe.yml)" >> $GITHUB_ENV + echo "FEDORA_MAJOR_VERSION=$(yq '.fedora-version' ./recipe.yml)" >> $GITHUB_ENV + echo "BASE_CONTAINER_URL=$(yq '.base-container' ./recipe.yml)" >> $GITHUB_ENV - name: Generate tags id: generate-tags @@ -113,7 +115,8 @@ jobs: tags: | ${{ steps.generate-tags.outputs.alias_tags }} build-args: | - FEDORA_MAJOR_VERSION=${{ matrix.major_version }} + FEDORA_MAJOR_VERSION=${{ env.FEDORA_MAJOR_VERSION }} + BASE_CONTAINER_URL=${{ env.BASE_CONTAINER_URL }} labels: ${{ steps.meta.outputs.labels }} oci: false diff --git a/Containerfile b/Containerfile index 6245b2b5cb..34be3fd516 100644 --- a/Containerfile +++ b/Containerfile @@ -1,7 +1,7 @@ ARG FEDORA_MAJOR_VERSION=37 +ARG BASE_CONTAINER_URL=ghcr.io/ublue-os/silverblue-main -# change this line if you want to change the image -FROM ghcr.io/ublue-os/silverblue-main:${FEDORA_MAJOR_VERSION} +FROM ${BASE_CONTAINER_URL}:${FEDORA_MAJOR_VERSION} # copy over configuration files COPY etc /etc diff --git a/recipe.yml b/recipe.yml index 07c74e4a07..ee213c8301 100644 --- a/recipe.yml +++ b/recipe.yml @@ -1,4 +1,13 @@ +# the image will be at ghcr.io/yourusername/name name: startingpoint + +# what native container image to build on top of +# images not built by ublue might function unexpectly +base-container: ghcr.io/ublue-os/silverblue-main + +# what fedora version to use, you can just change this to update +fedora-version: 37 + rpms: - python3-pip # needed for yafti flatpaks: