Skip to content

Commit

Permalink
chore(ci): build Aurora ISOs using a split workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
m2Giles committed Apr 8, 2024
1 parent 546b652 commit fbcc145
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 34 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build-aurora-iso.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: bluefin ISOs
on:
workflow_dispatch:

jobs:
build:
name: build
uses: ./.github/workflows/reusable-build-iso.yml
secrets: inherit
with:
brand_name: aurora
11 changes: 11 additions & 0 deletions .github/workflows/build-bluefin-iso.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: bluefin ISOs
on:
workflow_dispatch:

jobs:
build:
name: build
uses: ./.github/workflows/reusable-build-iso.yml
secrets: inherit
with:
brand_name: bluefin
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: Build Bluefin ISOs
name: Reusable Build ISOs
on:
workflow_dispatch:
workflow_call:
inputs:
brand_name:
description: "'aurora' or 'bluefin'"
required: true
type: string

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-iso
Expand All @@ -17,41 +21,49 @@ jobs:
strategy:
fail-fast: false
matrix:
image_name:
- bluefin
- bluefin-nvidia
- bluefin-asus
- bluefin-asus-nvidia
- bluefin-surface
- bluefin-surface-nvidia
- bluefin-dx
- bluefin-dx-nvidia
- bluefin-dx-asus
- bluefin-dx-surface
- bluefin-dx-asus-nvidia
- bluefin-dx-surface-nvidia
major_version: [38, 39]
image_flavor:
- main
- nvidia
- asus
- asus-nvidia
- surface
- surface-nvidia
base_name:
- ${{ inputs.brand_name }}
- ${{ inputs.brand_name }}-dx
fedora_version: [38, 39]
exclude:
- major_version: 38
image_name: bluefin-asus
- major_version: 38
image_name: bluefin-asus-nvidia
- major_version: 38
image_name: bluefin-dx-asus
- major_version: 38
image_name: bluefin-dx-asus-nvidia
- fedora_version: 38
image_flavor: asus
- fedora_version: 38
image_flavor: asus-nvidia
- fedora_version: 38
image_flavor: surface
- fedora_version: 38
image_flavor: surface-nvidia
include:
- major_version: 38
- fedora_version: 38
is_gts_version: true
- major_version: 39
- fedora_version: 39
is_gts_version: false
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]

- name: Checkout Repo
uses: actions/checkout@v4

- name: Matrix Variables
run: |
if [[ "${{ matrix.image_flavor }}" == "main" ]]; then
echo "IMAGE_NAME=${{ matrix.base_name }}" >> $GITHUB_ENV
else
echo "IMAGE_NAME=${{ format('{0}-{1}', matrix.base_name, matrix.image_flavor) }}" >> $GITHUB_ENV
fi
if [[ ${{ inputs.brand_name }} == "bluefin" ]]; then
echo "VARIANT=Silverblue" >> $GITHUB_ENV
elif [[ ${{ inputs.brand_name }} == "aurora" ]]; then
echo "VARIANT=Kinoite" >> $GITHUB_ENV
fi
- name: Set Image Tag
id: generate-tag
shell: bash
Expand All @@ -72,21 +84,31 @@ jobs:
# Would like to implement in the future. This will allow us to support image tags from a PR.
#if [[ github.event.number ]]; then
# TAG="pr-${{ github.event.number }}-${{ matrix.major_version }}"
# TAG="pr-${{ github.event.number }}-${{ matrix.fedora_version }}"
#fi
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- name: Set Flatpaks Directory Shortname
id: generate-flatpak-dir-shortname
shell: bash
run: |
if [[ ${{ inputs.brand_name }} = "bluefin" ]]; then
FLATPAK_DIR_SHORTNAME="bluefin_flatpaks"
elif [[ ${{ inputs.brand_name }} = "aurora" ]]; then
FLATPAK_DIR_SHORTNAME="aurora_flatpaks"
fi
echo "flatpak-dir-shortname=${FLATPAK_DIR_SHORTNAME}" >> $GITHUB_OUTPUT
- name: Determine Flatpak Dependencies
id: flatpak_dependencies
shell: bash
run: |
set -ex
image="ghcr.io/ublue-os/${{ matrix.image_name }}:${{ steps.generate-tag.outputs.tag }}"
image="ghcr.io/ublue-os/${{ env.IMAGE_NAME }}:${{ steps.generate-tag.outputs.tag }}"
# Make temp space
TEMP_FLATPAK_INSTALL_DIR=$(mktemp -d -p ${{ github.workspace }} flatpak.XXX)
# Get list of refs from directory
FLATPAK_REFS_DIR=${{ github.workspace }}/flatpaks
FLATPAK_REFS_DIR=${{ github.workspace }}/${{ steps.generate-flatpak-dir-shortname.outputs.flatpak-dir-shortname }}
FLATPAK_REFS_DIR_LIST=$(cat ${FLATPAK_REFS_DIR}/* | tr '\n' ' ' )
# Generate install script
cat << EOF > ${TEMP_FLATPAK_INSTALL_DIR}/script.sh
Expand All @@ -113,14 +135,14 @@ jobs:
id: build
with:
arch: x86_64
image_name: ${{ matrix.image_name }}
image_name: ${{ env.IMAGE_NAME }}
image_repo: ghcr.io/ublue-os
variant: 'Silverblue'
version: ${{ matrix.major_version }}
variant: ${{ env.VARIANT }}
version: ${{ matrix.fedora_version }}
image_tag: ${{ steps.generate-tag.outputs.tag }}
secure_boot_key_url: 'https://github.com/ublue-os/akmods/raw/main/certs/public_key.der'
enrollment_password: 'ublue-os'
iso_name: ${{ matrix.image_name }}-${{ steps.generate-tag.outputs.tag }}
iso_name: ${{ env.IMAGE_NAME }}-${{ steps.generate-tag.outputs.tag }}
enable_cache_dnf: "false"
enable_cache_skopeo: "false"
flatpak_remote_refs_dir: /github/workspace/flatpaks
Expand Down
15 changes: 15 additions & 0 deletions aurora_flatpaks/flatpaks
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
app/org.mozilla.Thunderbird/x86_64/stable
app/org.mozilla.firefox/x86_64/stable
app/org.kde.kcalc/x86_64/stable
app/org.kde.gwenview/x86_64/stable
app/org.kde.kontact/x86_64/stable
app/org.kde.okular/x86_64/stable
app/org.kde.kweather/x86_64/stable
app/org.kde.kclock/x86_64/stable
app/org.kde.haruna/x86_64/stable
app/org.kde.filelight/x86_64/stable
app/com.github.tchx84.Flatseal/x86_64/stable
app/io.github.dvlv.boxbuddyrs/x86_64/stable
app/io.github.flattool.Warehouse/x86_64/stable
app/org.fedoraproject.MediaWriter/x86_64/stable
app/io.missioncenter.MissionCenter/x86_64/stable
File renamed without changes.

0 comments on commit fbcc145

Please sign in to comment.