From 4d1ef9492fa0c1ecc3d5fd537d4090668d22c01f Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Tue, 31 Oct 2023 22:10:24 -0500 Subject: [PATCH 1/3] feat: change cron to 1400 UTC for official image build timing --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cabcd672..f5379072 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ on: pull_request: merge_group: schedule: - - cron: '0 6 * * *' # 6am everyday (1h after 'config') + - cron: '0 14 * * *' # 2pm UTC everyday (timed against official fedora container pushes, and after 'config') workflow_dispatch: env: IMAGE_NAME: akmods @@ -12,7 +12,7 @@ env: jobs: push-ghcr: - name: Build and push akmods image + name: akmods image runs-on: ubuntu-22.04 permissions: contents: read From b05d60128088196fd01d2b028e7673de1cb68e15 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Tue, 31 Oct 2023 22:21:03 -0500 Subject: [PATCH 2/3] feat(f39): use official upstream image for akmods builds Moving to official upstream images for `main` also implies the use of the official image's kernel for akmods builds. --- .github/workflows/build.yml | 15 +++++++++++++-- Containerfile.common | 3 ++- Containerfile.nvidia | 3 ++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5379072..fc65dcf3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,6 @@ on: env: IMAGE_NAME: akmods IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} - SOURCE_IMAGE: base jobs: push-ghcr: @@ -43,6 +42,17 @@ jobs: - name: Checkout Push to Registry action uses: actions/checkout@v4 + - name: Matrix Variables + shell: bash + run: | + if [[ "${{ matrix.major_version }}" -ge "39" ]]; then + echo "SOURCE_IMAGE=fedora-silverblue" >> $GITHUB_ENV + echo "SOURCE_ORG=fedora" >> $GITHUB_ENV + else + echo "SOURCE_IMAGE=base" >> $GITHUB_ENV + echo "SOURCE_ORG=fedora-ostree-desktops" >> $GITHUB_ENV + fi + - name: Generate tags id: generate-tags shell: bash @@ -97,7 +107,7 @@ jobs: - name: Get current versions id: labels run: | - skopeo inspect docker://quay.io/fedora-ostree-desktops/${{ env.SOURCE_IMAGE }}:${{ matrix.major_version }} > inspect.json + skopeo inspect docker://quay.io/${{ env.SOURCE_ORG }}/${{ env.SOURCE_IMAGE }}:${{ matrix.major_version }} > inspect.json version=$(jq -r '.Labels["org.opencontainers.image.version"]' inspect.json) linux=$(jq -r '.Labels["ostree.linux"]' inspect.json) echo "VERSION=$version" >> $GITHUB_OUTPUT @@ -130,6 +140,7 @@ jobs: ${{ steps.generate-tags.outputs.alias_tags }} build-args: | SOURCE_IMAGE=${{ env.SOURCE_IMAGE }} + SOURCE_ORG=${{ env.SOURCE_ORG }} KERNEL_FLAVOR=${{ matrix.kernel_flavor }} FEDORA_MAJOR_VERSION=${{ matrix.major_version }} NVIDIA_MAJOR_VERSION=${{ matrix.nvidia_version }} diff --git a/Containerfile.common b/Containerfile.common index a29d22e3..43d355ae 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -4,7 +4,8 @@ #Build from base, simpley because it's the smallest image ARG SOURCE_IMAGE="${SOURCE_IMAGE:-base}" -ARG BASE_IMAGE="quay.io/fedora-ostree-desktops/${SOURCE_IMAGE}" +ARG SOURCE_ORG="${SOURCE_ORG:-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 builder diff --git a/Containerfile.nvidia b/Containerfile.nvidia index f6fd0343..4350d2dd 100644 --- a/Containerfile.nvidia +++ b/Containerfile.nvidia @@ -4,7 +4,8 @@ #Build from base, simpley because it's the smallest image ARG SOURCE_IMAGE="${SOURCE_IMAGE:-base}" -ARG BASE_IMAGE="quay.io/fedora-ostree-desktops/${SOURCE_IMAGE}" +ARG SOURCE_ORG="${SOURCE_ORG:-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 builder From ca1186ed0e2f053b1e741731b2a24afbd93f5c31 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Tue, 31 Oct 2023 22:28:02 -0500 Subject: [PATCH 3/3] fix: missing double quotes --- Containerfile.common | 2 +- Containerfile.nvidia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Containerfile.common b/Containerfile.common index 43d355ae..dc592fc1 100644 --- a/Containerfile.common +++ b/Containerfile.common @@ -4,7 +4,7 @@ #Build from base, simpley because it's the smallest image ARG SOURCE_IMAGE="${SOURCE_IMAGE:-base}" -ARG SOURCE_ORG="${SOURCE_ORG:-fedora-ostree-desktops} +ARG SOURCE_ORG="${SOURCE_ORG:-fedora-ostree-desktops}" ARG BASE_IMAGE="quay.io/${SOURCE_ORG}/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-38}" diff --git a/Containerfile.nvidia b/Containerfile.nvidia index 4350d2dd..9659a181 100644 --- a/Containerfile.nvidia +++ b/Containerfile.nvidia @@ -4,7 +4,7 @@ #Build from base, simpley because it's the smallest image ARG SOURCE_IMAGE="${SOURCE_IMAGE:-base}" -ARG SOURCE_ORG="${SOURCE_ORG:-fedora-ostree-desktops} +ARG SOURCE_ORG="${SOURCE_ORG:-fedora-ostree-desktops}" ARG BASE_IMAGE="quay.io/${SOURCE_ORG}/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-38}"