Skip to content

Build Blue9 Live ISO #36

Build Blue9 Live ISO

Build Blue9 Live ISO #36

---
name: Build Blue9 Live ISO
on:
schedule:
- cron:
"00 10 * * 1" # build at 10:00 UTC every Monday
workflow_dispatch:
env:
IMAGE_REGISTRY: "ghcr.io/winblues"
IMAGE_NAME: "blue9"
DEFAULT_TAG: "latest"
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
name: Build ISOs
runs-on: 'ubuntu-24.04'
strategy:
fail-fast: false
permissions:
contents: read
packages: read
id-token: write
steps:
- name: Maximize build space
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
run: |
OUTPUT_NAME="${IMAGE_REGISTRY}/${IMAGE_NAME}"
echo "image_ref=$OUTPUT_NAME" >> "${GITHUB_OUTPUT}"
- name: Build ISO
id: build
uses: ublue-os/titanoboa@main
with:
livesys: "true"
image-ref: ${{ steps.image_ref.outputs.image_ref }}:latest
flatpaks-list: ${{ github.workspace }}/files/system/etc/ublue-os/system-flatpaks.list
#hook-post-rootfs: ${{ github.workspace }}/iso_files/configure_iso.sh
- name: Rename ISO
id: rename
env:
OUTPUT_PATH: ${{ steps.build.outputs.iso-dest }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}-live
DEFAULT_TAG: ${{ env.DEFAULT_TAG }}
run: |
set -x
mkdir -p output
OUTPUT_DIRECTORY="$(realpath output)"
sha256sum "${OUTPUT_PATH}" | tee "${OUTPUT_DIRECTORY}/${IMAGE_NAME}-${DEFAULT_TAG}.iso-CHECKSUM"
mv "${OUTPUT_PATH}" "${OUTPUT_DIRECTORY}/${IMAGE_NAME}-${DEFAULT_TAG}.iso"
echo "output_directory=$OUTPUT_DIRECTORY" >> "${GITHUB_OUTPUT}"
#- name: Upload to Job Artifacts
# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
#with:
# name: ${{ env.IMAGE_NAME }}-${{ env.DEFAULT_TAG }}-iso
# if-no-files-found: error
# path: ${{ steps.build.outputs.iso-dest }}
- name: Upload to CloudFlare
if: 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