-
-
Notifications
You must be signed in to change notification settings - Fork 257
Expand file tree
/
Copy pathreusable-build-iso-anaconda.yml
More file actions
132 lines (118 loc) · 4.33 KB
/
Copy pathreusable-build-iso-anaconda.yml
File metadata and controls
132 lines (118 loc) · 4.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
---
name: Build ISOs (Live Anaconda)
on:
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/reusable-build-iso-anaconda.yml"
- "iso_files/configure_iso_anaconda.sh"
env:
IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}"
IMAGE_NAME: "bluefin"
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: ["main", "nvidia-open"]
image_version: ["gts", "stable"]
include:
- platform: amd64
flavor: "main"
image_version: lts
- platform: arm64
flavor: "main"
image_version: lts
- platform: amd64
flavor: gdx
image_version: lts
- platform: arm64
flavor: gdx
image_version: lts
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: Setup Just
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
- name: Check Just Syntax
shell: bash
run: |
just check
- name: Format image ref
id: image_ref
env:
FLAVOR: ${{ matrix.flavor }}
run: |
set -eoux pipefail
image_name=$(just image_name "bluefin" "${{ matrix.image_version}}" "${{ matrix.flavor}}")
image_ref="${IMAGE_REGISTRY}/${image_name}"
KARGS="NONE"
echo "image_ref=$image_ref" >> "${GITHUB_OUTPUT}"
echo "artifact_format="$image_name-${{ matrix.image_version }}-$(uname -m)"" >> "${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_anaconda.sh
kargs: ${{ steps.image_ref.outputs.kargs }}
- name: Rename ISO
id: rename
env:
OUTPUT_PATH: ${{ steps.build.outputs.iso-dest }}
FLAVOR: ${{ matrix.flavor }}
OUTPUT_NAME: ${{ steps.image_ref.outputs.artifact_format }}
IMAGE_VERSION: ${{ matrix.image_version }}
run: |
set -x
mkdir -p output
OUTPUT_DIRECTORY="$(realpath output)"
sha256sum "${OUTPUT_PATH}" | tee "${OUTPUT_DIRECTORY}/${OUTPUT_NAME}.iso-CHECKSUM"
mv "${OUTPUT_PATH}" "${OUTPUT_DIRECTORY}/${OUTPUT_NAME}.iso"
echo "output_directory=$OUTPUT_DIRECTORY" >> "${GITHUB_OUTPUT}"
- name: Upload to Job Artifacts
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: ${{ steps.image_ref.outputs.artifact_format }}
if-no-files-found: error
path: ${{ steps.rename.outputs.output_directory }}
- 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_2025 }}
RCLONE_CONFIG_R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY_2025 }}
RCLONE_CONFIG_R2_REGION: auto
RCLONE_CONFIG_R2_ENDPOINT: ${{ secrets.R2_ENDPOINT_2025 }}
SOURCE_DIR: ${{ steps.rename.outputs.output_directory }}
run: |
sudo apt-get update
sudo apt-get install -y rclone
rclone copy "${SOURCE_DIR}" R2:bluefin