Skip to content

Commit

Permalink
add iso workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyalOughtness authored Apr 2, 2024
1 parent 8b24f06 commit ad4d963
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 15 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/build-38.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/iso-39.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: ublue uwe iso 39
on:
workflow_dispatch:
jobs:
build:
name: build
uses: ./.github/workflows/reusable-iso-release.yml
secrets: inherit
with:
fedora_version: 39
110 changes: 110 additions & 0 deletions .github/workflows/reusable-iso-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: ublue iso release
on:
workflow_call:
inputs:
fedora_version:
description: 'The Fedora release version: 38, 39, 40, etc'
required: true
type: string
env:
IMAGE_REGISTRY: ghcr.io/ublue-os
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{ inputs.fedora_version }}
cancel-in-progress: true
jobs:
build_ublue:
name: hwe
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
id-token: write
strategy:
fail-fast: false
matrix:
fedora_version:
- ${{ inputs.fedora_version }}
hwe_flavor:
- main
- asus
- surface
image_name:
- silverblue
- kinoite
- sericea
- onyx
- base
- lazurite
- mate
- vauxite
nvidia_version:
- 0 # No Nvidia drivers (this indicates to only build "main" image target
- 470 # Older Nvidia driver
- 550 # Latest Nvidia driver (update IS_LATEST_DRIVER below if version changes)
exclude:
# There is currently no Fedora 40 version of mate
- image_name: mate
fedora_version: 40
# Don't build/push "main" since it would be a duplicate of the "base" `*-main` images
- nvidia_version: 0
hwe_flavor: main
# Only build latest nvidia version for "surface" HWE flavor
- nvidia_version: 470
hwe_flavor: surface
# Only build latest nvidia version for F40 (temporarily broken? not building in akmods)
- fedora_version: 40
nvidia_version: 470
steps:
# Checkout push-to-registry action GitHub repository
- name: Checkout Push to Registry action
uses: actions/checkout@v4

- name: Matrix Variables
shell: bash
run: |
if [[ "${{ matrix.hwe_flavor }}" == "main" ]]; then
if [[ "${{ matrix.nvidia_version }}" == "0" ]]; then
echo "this workflow does not build main image without Nvidia drivers"
exit 1
fi
echo "IMAGE_NAME=${{ matrix.image_name }}-nvidia" >> $GITHUB_ENV
else
if [[ "${{ matrix.nvidia_version }}" == "0" ]]; then
echo "IMAGE_NAME=${{ matrix.image_name }}-${{ matrix.hwe_flavor }}" >> $GITHUB_ENV
else
echo "IMAGE_NAME=${{ matrix.image_name }}-${{ matrix.hwe_flavor }}-nvidia" >> $GITHUB_ENV
fi
fi
echo "SOURCE_IMAGE=${{ matrix.image_name }}-main" >> $GITHUB_ENV
if [[ "${{ matrix.image_name }}" == "silverblue" ]]; then
export IMAGE_VARIANT=Silverblue
else
export IMAGE_VARIANT=Kinoite
fi
echo "IMAGE_VARIANT=${IMAGE_VARIANT}" >> $GITHUB_ENV
TIMESTAMP="$(date +%Y%m%d)"
echo "TIMESTAMP=${TIMESTAMP}" >> $GITHUB_ENV
- name: Build ISOs
uses: ublue-os/[email protected]
id: build
with:
ARCH: x86_64
IMAGE_NAME: ${{ env.IMAGE_NAME }}
IMAGE_REPO: ${{ env.IMAGE_REGISTRY }}
VARIANT: ${{ env.IMAGE_VARIANT }}
VERSION: ${{ matrix.fedora_version }}
IMAGE_TAG: ${{ matrix.fedora_version }}
SECURE_BOOT_KEY_URL: 'https://github.com/ublue-os/akmods/raw/main/certs/public_key.der'
ENROLLMENT_PASSWORD: 'ublue-os'

- name: Upload ISO to archive.org
uses: qoijjj/internet-archive-upload@v7
with:
access-key: ${{ secrets.IA_ACCESS_KEY }}
secret-key: ${{ secrets.IA_SECRET_KEY }}
identifier: ${{ env.IMAGE_NAME }}-${{ env.TIMESTAMP }}
files: ${{ steps.build.outputs.output-directory }}

0 comments on commit ad4d963

Please sign in to comment.