Skip to content

Commit

Permalink
feat(f39): Use official images for Silverblue, Kinoite, and Sericea (u…
Browse files Browse the repository at this point in the history
…blue-os#407)

Co-authored-by: Benjamin Sherman <[email protected]>
  • Loading branch information
EyeCantCU and bsherman authored Nov 1, 2023
1 parent b866e6e commit 5062628
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
merge_group:
schedule:
- cron: '0 7 * * *' # 7 am everyday
- cron: '0 15 * * *' # 3pm UTC everyday (timed against official fedora container pushes)
workflow_dispatch:
env:
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
Expand Down Expand Up @@ -68,11 +68,19 @@ jobs:
- name: Matrix Variables
shell: bash
run: |
if [[ "${{ matrix.image_name }}" == "lxqt" || "${{ matrix.image_name }}" == "mate" ]]; then
echo "SOURCE_IMAGE=base" >> $GITHUB_ENV
if [[ "${{ matrix.major_version }}" -ge "39" ]] && \
grep "${{ matrix.image_name }}" <<< "silverblue, kinoite, sericea"; then
echo "SOURCE_ORG=fedora" >> $GITHUB_ENV
echo "SOURCE_IMAGE=fedora-${{ matrix.image_name }}" >> $GITHUB_ENV
else
echo "SOURCE_IMAGE=${{ matrix.image_name }}" >> $GITHUB_ENV
if [[ "${{ matrix.image_name }}" == "lxqt" || "${{ matrix.image_name }}" == "mate" ]]; then
echo "SOURCE_IMAGE=base" >> $GITHUB_ENV
else
echo "SOURCE_IMAGE=${{ matrix.image_name }}" >> $GITHUB_ENV
fi
echo "SOURCE_ORG=fedora-ostree-desktops" >> $GITHUB_ENV
fi
# THE FOLLOWING IS MESSY BUT TEMPORARY UNTIL F38 IS GONE
# see: https://github.com/ublue-os/main/issues/369
# Fedora 39+ images do not include custom kmods (legacy)
Expand Down Expand Up @@ -146,7 +154,7 @@ jobs:
- name: Get current version
id: labels
run: |
ver=$(skopeo inspect docker://quay.io/fedora-ostree-desktops/${{ env.SOURCE_IMAGE }}:${{ matrix.major_version }} | jq -r '.Labels["org.opencontainers.image.version"]')
ver=$(skopeo inspect docker://quay.io/${{ env.SOURCE_ORG }}/${{ env.SOURCE_IMAGE }}:${{ matrix.major_version }} | jq -r '.Labels["org.opencontainers.image.version"]')
echo "VERSION=$ver" >> $GITHUB_OUTPUT
# Generate image metadata
Expand Down Expand Up @@ -175,6 +183,7 @@ jobs:
${{ steps.generate-tags.outputs.alias_tags }}
build-args: |
IMAGE_NAME=${{ matrix.image_name }}
SOURCE_ORG=${{ env.SOURCE_ORG }}
SOURCE_IMAGE=${{ env.SOURCE_IMAGE }}
FEDORA_MAJOR_VERSION=${{ matrix.major_version }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
3 changes: 2 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG IMAGE_NAME="${IMAGE_NAME:-silverblue}"
ARG SOURCE_IMAGE="${SOURCE_IMAGE:-silverblue}"
ARG BASE_IMAGE="quay.io/fedora-ostree-desktops/${SOURCE_IMAGE}"
ARG SOURCE_ORG="${SOURCE_IMAGE:-fedora-ostree-desktops}"
ARG BASE_IMAGE="quay.io/${SOURCE_ORG}/${SOURCE_IMAGE}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-38}"

FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS nokmods
Expand Down

0 comments on commit 5062628

Please sign in to comment.