diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c70173e..92c04f4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }} @@ -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) @@ -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 @@ -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 }} diff --git a/Containerfile b/Containerfile index 80ae7a0c..a410af41 100644 --- a/Containerfile +++ b/Containerfile @@ -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