Merge pull request #15 from ublue-os/more-config

feat: more config options in recipe.yml
This commit is contained in:
Eino Rauhala
2023-04-03 16:03:16 +03:00
committed by GitHub
3 changed files with 33 additions and 8 deletions

View File

@@ -17,7 +17,6 @@ on:
workflow_dispatch:
env:
IMAGE_NAME: startingpoint
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
jobs:
@@ -41,9 +40,15 @@ jobs:
- name: Checkout Push to Registry action
uses: actions/checkout@v3
- name: Matrix Variables
- name: Add yq for reading recipe.yml
uses: mikefarah/yq@v4.33.2
- name: Gather image data from recipe
run: |
echo "IMAGE_NAME=${{ env.IMAGE_NAME }}" >> $GITHUB_ENV
echo "IMAGE_NAME=$(yq '.name' ./recipe.yml)" >> $GITHUB_ENV
echo "IMAGE_DESCRIPTION=$(yq '.description' ./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
@@ -96,7 +101,7 @@ jobs:
${{ env.IMAGE_NAME }}
labels: |
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
org.opencontainers.image.description=A starting point for further customization of uBlue images. Make your own! https://ublue.it/making-your-own/
org.opencontainers.image.description=${{ env.IMAGE_DESCRIPTION }}
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/startingpoint/main/README.md
io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/120078124?s=200&v=4
@@ -111,7 +116,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

View File

@@ -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

View File

@@ -1,5 +1,24 @@
# 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
# this description will be visible in the containers metadata
description: A starting point for further customization of uBlue images. Make your own! https://ublue.it/making-your-own/
# these rpms will be installed from the fedora repository
# using rpm-ostree and will be preinstalled in the final image
rpms:
- python3-pip # needed for yafti
- python3-pip # needed for yafti (the first boot installer)
# these flatpaks (from flathub) will be available for install on boot
# this is just an example selection, and even if you leave it empty,
# you'll have the basic options available in yafti
flatpaks:
- org.mozilla.firefox
- org.mozilla.Thunderbird