parent
ed7d5c0837
commit
d67c3eb5aa
1 changed files with 0 additions and 125 deletions
125
.github/workflows/reusable-build-iso-readymade.yml
vendored
125
.github/workflows/reusable-build-iso-readymade.yml
vendored
|
|
@ -1,125 +0,0 @@
|
|||
---
|
||||
name: Build ISOs (Readymade)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
upload-to-cloudflare:
|
||||
description: "Upload to Cloudflare"
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
#schedule:
|
||||
# - cron: "0 1 * * *"
|
||||
|
||||
env:
|
||||
IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}"
|
||||
IMAGE_NAME: "aurora"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build ISOs
|
||||
runs-on: ${{ matrix.platform == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [amd64]
|
||||
flavor: ["", "nvidia-open"]
|
||||
image_version: ["stable"]
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
if: matrix.platform == 'arm64'
|
||||
run: |
|
||||
set -x
|
||||
sudo apt update -y
|
||||
sudo apt install -y \
|
||||
podman
|
||||
|
||||
- name: Maximize build space
|
||||
if: matrix.platform != 'arm64'
|
||||
uses: ublue-os/remove-unwanted-software@cc0becac701cf642c8f0a6613bbdaf5dc36b259e # v9
|
||||
with:
|
||||
remove-codeql: true
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
|
||||
- name: Format image ref
|
||||
id: image_ref
|
||||
env:
|
||||
FLAVOR: ${{ matrix.flavor }}
|
||||
run: |
|
||||
OUTPUT_NAME="${IMAGE_REGISTRY}/${IMAGE_NAME}"
|
||||
ARTIFACT_FORMAT=""
|
||||
KARGS="NONE"
|
||||
if [ "$FLAVOR" != "" ] ; then
|
||||
OUTPUT_NAME="${OUTPUT_NAME}-${FLAVOR}"
|
||||
ARTIFACT_FORMAT="-${FLAVOR}"
|
||||
if [[ "$FLAVOR" =~ nvidia ]] ; then
|
||||
KARGS="rd.driver.blacklist=nouveau,modprobe.blacklist=nouveau,nvidia-drm.modeset=1"
|
||||
fi
|
||||
fi
|
||||
echo "image_ref=$OUTPUT_NAME" >> "${GITHUB_OUTPUT}"
|
||||
echo "artifact_format=$ARTIFACT_FORMAT" >> "${GITHUB_OUTPUT}"
|
||||
echo "kargs=$KARGS" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Build ISO
|
||||
id: build
|
||||
uses: ublue-os/titanoboa@main
|
||||
with:
|
||||
image-ref: ${{ steps.image_ref.outputs.image_ref }}:${{ matrix.image_version }}
|
||||
flatpaks-list: ${{ github.workspace }}/iso_files/system-flatpaks.list
|
||||
hook-post-rootfs: ${{ github.workspace }}/iso_files/configure_iso.sh
|
||||
kargs: ${{ steps.image_ref.outputs.kargs }}
|
||||
|
||||
- name: Rename ISO
|
||||
id: rename
|
||||
env:
|
||||
OUTPUT_PATH: ${{ steps.build.outputs.iso-dest }}
|
||||
FLAVOR: ${{ matrix.flavor }}
|
||||
ARTIFACT_FORMAT: ${{ steps.image_ref.outputs.artifact_format }}
|
||||
IMAGE_VERSION: ${{ matrix.image_version }}
|
||||
run: |
|
||||
set -x
|
||||
mkdir -p output
|
||||
OUTPUT_NAME="readymade-${IMAGE_NAME}${ARTIFACT_FORMAT}-${IMAGE_VERSION}"
|
||||
OUTPUT_DIRECTORY="$(realpath output)"
|
||||
if [ "${FLAVOR}" != "" ] ; then
|
||||
IMAGE_NAME="${IMAGE_NAME}-${FLAVOR}"
|
||||
fi
|
||||
sha256sum "${OUTPUT_PATH}" | tee "${OUTPUT_DIRECTORY}/${OUTPUT_NAME}-$(uname -m).iso-CHECKSUM"
|
||||
mv "${OUTPUT_PATH}" "${OUTPUT_DIRECTORY}/${OUTPUT_NAME}-$(uname -m).iso"
|
||||
echo "output_directory=$OUTPUT_DIRECTORY" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Upload to Job Artifacts
|
||||
if: inputs.upload-to-cloudflare == false || github.event_name == 'pull_request'
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
name: ${{ env.IMAGE_NAME }}-live${{ steps.image_ref.outputs.artifact_format }}-${{ matrix.image_version }}-${{ matrix.platform }}-iso
|
||||
if-no-files-found: error
|
||||
path: ${{ steps.rename.outputs.output_directory }}
|
||||
|
||||
- name: Upload to CloudFlare
|
||||
if: inputs.upload-to-cloudflare == true && github.event_name != 'pull_request'
|
||||
shell: bash
|
||||
env:
|
||||
RCLONE_CONFIG_R2_TYPE: s3
|
||||
RCLONE_CONFIG_R2_PROVIDER: Cloudflare
|
||||
RCLONE_CONFIG_R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
|
||||
RCLONE_CONFIG_R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
||||
RCLONE_CONFIG_R2_REGION: auto
|
||||
RCLONE_CONFIG_R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }}
|
||||
SOURCE_DIR: ${{ steps.rename.outputs.output_directory }}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y rclone
|
||||
rclone copy "${SOURCE_DIR}" R2:ublue-ledif
|
||||
Loading…
Reference in a new issue