Merge pull request #16 from ublue-os/multibuild
feat: multibuild using recipe matrix
This commit is contained in:
27
.github/workflows/build.yml
vendored
27
.github/workflows/build.yml
vendored
@@ -30,11 +30,10 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
major_version: [37]
|
||||
include:
|
||||
- major_version: 37
|
||||
is_latest_version: true
|
||||
is_stable_version: true
|
||||
recipe:
|
||||
- recipe.yml
|
||||
- recipe-38.yml
|
||||
|
||||
steps:
|
||||
# Checkout push-to-registry action GitHub repository
|
||||
- name: Checkout Push to Registry action
|
||||
@@ -45,10 +44,10 @@ jobs:
|
||||
|
||||
- name: Gather image data from recipe
|
||||
run: |
|
||||
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
|
||||
echo "IMAGE_NAME=$(yq '.name' ./${{ matrix.recipe }})" >> $GITHUB_ENV
|
||||
echo "IMAGE_DESCRIPTION=$(yq '.description' ./${{ matrix.recipe }})" >> $GITHUB_ENV
|
||||
echo "FEDORA_MAJOR_VERSION=$(yq '.fedora-version' ./${{ matrix.recipe }})" >> $GITHUB_ENV
|
||||
echo "BASE_CONTAINER_URL=$(yq '.base-container' ./${{ matrix.recipe }})" >> $GITHUB_ENV
|
||||
|
||||
- name: Generate tags
|
||||
id: generate-tags
|
||||
@@ -56,26 +55,18 @@ jobs:
|
||||
run: |
|
||||
# Generate a timestamp for creating an image version history
|
||||
TIMESTAMP="$(date +%Y%m%d)"
|
||||
MAJOR_VERSION="${{ matrix.major_version }}"
|
||||
MAJOR_VERSION="${{ env.FEDORA_MAJOR_VERSION }}"
|
||||
COMMIT_TAGS=()
|
||||
BUILD_TAGS=()
|
||||
# Have tags for tracking builds during pull request
|
||||
SHA_SHORT="$(git rev-parse --short HEAD)"
|
||||
COMMIT_TAGS+=("pr-${{ github.event.number }}-${MAJOR_VERSION}")
|
||||
COMMIT_TAGS+=("${SHA_SHORT}-${MAJOR_VERSION}")
|
||||
if [[ "${{ matrix.is_latest_version }}" == "true" ]] && \
|
||||
[[ "${{ matrix.is_stable_version }}" == "true" ]]; then
|
||||
COMMIT_TAGS+=("pr-${{ github.event.number }}")
|
||||
COMMIT_TAGS+=("${SHA_SHORT}")
|
||||
fi
|
||||
|
||||
BUILD_TAGS=("${MAJOR_VERSION}" "${MAJOR_VERSION}-${TIMESTAMP}")
|
||||
|
||||
if [[ "${{ matrix.is_latest_version }}" == "true" ]] && \
|
||||
[[ "${{ matrix.is_stable_version }}" == "true" ]]; then
|
||||
BUILD_TAGS+=("${TIMESTAMP}")
|
||||
BUILD_TAGS+=("latest")
|
||||
fi
|
||||
|
||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
echo "Generated the following commit tags: "
|
||||
|
||||
30
recipe-38.yml
Normal file
30
recipe-38.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
# 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: 38
|
||||
|
||||
# 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 (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
|
||||
- com.mattjakeman.ExtensionManager
|
||||
- org.libreoffice.LibreOffice
|
||||
- org.gnome.DejaDup
|
||||
- org.gustavoperedo.FontDownloader
|
||||
- com.github.tchx84.Flatseal
|
||||
- io.github.celluloid_player.Celluloid
|
||||
Reference in New Issue
Block a user