feat: declare base image and fedora ver in recipe

This commit is contained in:
ER
2023-04-03 15:17:16 +03:00
parent 5947af45da
commit fe16187a92
3 changed files with 15 additions and 3 deletions

View File

@@ -46,6 +46,8 @@ jobs:
- name: Gather image data from recipe - name: Gather image data from recipe
run: | run: |
echo "IMAGE_NAME=$(yq '.name' ./recipe.yml)" >> $GITHUB_ENV 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 - name: Generate tags
id: generate-tags id: generate-tags
@@ -113,7 +115,8 @@ jobs:
tags: | tags: |
${{ steps.generate-tags.outputs.alias_tags }} ${{ steps.generate-tags.outputs.alias_tags }}
build-args: | 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 }} labels: ${{ steps.meta.outputs.labels }}
oci: false oci: false

View File

@@ -1,7 +1,7 @@
ARG FEDORA_MAJOR_VERSION=37 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 ${BASE_CONTAINER_URL}:${FEDORA_MAJOR_VERSION}
FROM ghcr.io/ublue-os/silverblue-main:${FEDORA_MAJOR_VERSION}
# copy over configuration files # copy over configuration files
COPY etc /etc COPY etc /etc

View File

@@ -1,4 +1,13 @@
# the image will be at ghcr.io/yourusername/name
name: startingpoint 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: rpms:
- python3-pip # needed for yafti - python3-pip # needed for yafti
flatpaks: flatpaks: