Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

Commit 5ca1618

Browse files
authored
Merge pull request #13 from ArctineLabs/edge
Edge to Main
2 parents 67acf33 + 5841634 commit 5ca1618

57 files changed

Lines changed: 2606 additions & 350 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-disk.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
name: Build disk images
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
upload-to-s3:
8+
description: "Upload to S3"
9+
required: false
10+
default: false
11+
type: boolean
12+
platform:
13+
required: true
14+
type: choice
15+
options:
16+
- amd64
17+
- arm64
18+
pull_request:
19+
branches:
20+
- main
21+
paths:
22+
- './disk_config/iso.toml'
23+
- './.github/workflows/build-disk.yml'
24+
25+
env:
26+
IMAGE_NAME: ${{ github.event.repository.name }} # output of build.yml, keep in sync
27+
IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}" # do not edit
28+
DEFAULT_TAG: "latest"
29+
BIB_IMAGE: "ghcr.io/lorbuschris/bootc-image-builder:20250608" # "quay.io/centos-bootc/bootc-image-builder:latest" - see https://github.com/osbuild/bootc-image-builder/pull/954
30+
31+
concurrency:
32+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
33+
cancel-in-progress: true
34+
35+
jobs:
36+
build:
37+
name: Build disk images
38+
runs-on: ${{ inputs.platform == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }}
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
disk-type: ["qcow2", "anaconda-iso"]
43+
permissions:
44+
contents: read
45+
packages: read
46+
id-token: write
47+
48+
steps:
49+
- name: Prepare environment
50+
run: |
51+
USER_UID=$(id -u)
52+
USER_GID=$(id -g)
53+
# Concatenate the types with a hyphen
54+
DISK_TYPE=$(echo "${{ matrix.disk-type }}" | tr ' ' '-')
55+
# Lowercase the image uri
56+
echo "IMAGE_REGISTRY=${IMAGE_REGISTRY,,}" >> ${GITHUB_ENV}
57+
echo "IMAGE_NAME=${IMAGE_NAME,,}" >> ${GITHUB_ENV}
58+
echo "DISK_TYPE=${DISK_TYPE}" >> ${GITHUB_ENV}
59+
echo "USER_UID=${USER_UID}" >> ${GITHUB_ENV}
60+
echo "USER_GID=${USER_GID}" >> ${GITHUB_ENV}
61+
62+
- name: Install dependencies
63+
if: inputs.platform == 'arm64'
64+
run: |
65+
set -x
66+
sudo apt update -y
67+
sudo apt install -y \
68+
podman
69+
70+
- name: Maximize build space
71+
if: inputs.platform != 'arm64'
72+
uses: ublue-os/remove-unwanted-software@cc0becac701cf642c8f0a6613bbdaf5dc36b259e # v9
73+
with:
74+
remove-codeql: true
75+
76+
- name: Checkout
77+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
78+
79+
- name: Build disk images
80+
id: build
81+
uses: osbuild/bootc-image-builder-action@main
82+
with:
83+
builder-image: ${{ env.BIB_IMAGE }}
84+
config-file: ${{ matrix.disk-type == 'anaconda-iso' && './disk_config/iso.toml' || './disk_config/disk.toml' }}
85+
image: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }}
86+
chown: ${{ env.USER_UID }}:${{ env.USER_GID }}
87+
types: ${{ matrix.disk-type }}
88+
additional-args: --use-librepo=True
89+
90+
- name: Upload disk images and Checksum to Job Artifacts
91+
if: inputs.upload-to-s3 != true && github.event_name != 'pull_request'
92+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
93+
with:
94+
path: ${{ steps.build.outputs.output-directory }}
95+
if-no-files-found: error
96+
retention-days: 0
97+
compression-level: 0
98+
overwrite: true
99+
100+
- name: Upload to S3
101+
if: inputs.upload-to-s3 == true && github.event_name != 'pull_request'
102+
shell: bash
103+
env:
104+
RCLONE_CONFIG_S3_TYPE: s3
105+
RCLONE_CONFIG_S3_PROVIDER: ${{ secrets.S3_PROVIDER }}
106+
RCLONE_CONFIG_S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
107+
RCLONE_CONFIG_S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
108+
RCLONE_CONFIG_S3_REGION: ${{ secrets.S3_REGION }}
109+
RCLONE_CONFIG_S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
110+
SOURCE_DIR: ${{ steps.build.outputs.output-directory }}
111+
run: |
112+
sudo apt-get update
113+
sudo apt-get install -y rclone
114+
rclone copy $SOURCE_DIR S3:${{ secrets.S3_BUCKET_NAME }}

.github/workflows/build-iso-staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ on:
2424
- './Justfile'
2525

2626
env:
27-
IMAGE_REGISTRY: "ghcr.io/Icycoide/TyrianOS-EDGE"
27+
IMAGE_REGISTRY: "ghcr.io/ArctineLabs/TyrianOS-EDGE"
2828
DEFAULT_TAG: "latest"
2929

3030
concurrency:
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
---
2+
name: Build TyrianOS EDGE
3+
on:
4+
pull_request:
5+
branches:
6+
- edge
7+
schedule:
8+
- cron: '50 09 * * *' # 9:50am UTC everyday
9+
push:
10+
branches:
11+
- edge
12+
paths-ignore:
13+
- '**/README.md'
14+
workflow_dispatch:
15+
16+
env:
17+
IMAGE_NAME: "TyrianOS-Edge" # the name of the image produced by this build, (no longer) matches repo names
18+
IMAGE_DESC: "TyrianOS EDGE"
19+
IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}" # do not edit
20+
ARTIFACTHUB_LOGO_URL: "https://avatars.githubusercontent.com/u/120078124?s=200&v=4" # You should put your own image here so that you get a fancy profile image on https://artifacthub.io/!
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{ inputs.brand_name}}-${{ inputs.stream_name }}
24+
cancel-in-progress: true
25+
26+
jobs:
27+
build_push:
28+
name: Build and push image
29+
runs-on: ubuntu-24.04
30+
31+
permissions:
32+
contents: read
33+
packages: write
34+
id-token: write
35+
36+
steps:
37+
# These stage versions are pinned by https://github.com/renovatebot/renovate
38+
- name: Checkout
39+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
40+
41+
# This is optional, but if you see that your builds are way too big for the runners, you can enable this by uncommenting the following lines:
42+
# - name: Maximize build space
43+
# uses: ublue-os/remove-unwanted-software@517622d6452028f266b7ba4cc9a123b5f58a6b53 # v7
44+
# with:
45+
# remove-codeql: true
46+
47+
- name: Get current date
48+
id: date
49+
run: |
50+
# This generates a timestamp like what is defined on the ArtifactHub documentation
51+
# E.G: 2022-02-08T15:38:15Z'
52+
# https://artifacthub.io/docs/topics/repositories/container-images/
53+
# https://linux.die.net/man/1/date
54+
echo "date=$(date -u +%Y\-%m\-%d\T%H\:%M\:%S\Z)" >> $GITHUB_OUTPUT
55+
56+
# Image metadata for https://artifacthub.io/ - This is optional but is highly recommended so we all can get a index of all the custom images
57+
# The metadata by itself is not going to do anything, you choose if you want your image to be on ArtifactHub or not.
58+
- name: Image Metadata
59+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5
60+
id: metadata
61+
with:
62+
# This generates all the tags for your image, you can add custom tags here too!
63+
# By default, it should generate "latest" and "latest.(date here)".
64+
tags: |
65+
type=raw,value=latest
66+
type=raw,value=latest.{{date 'YYYYMMDD'}}
67+
type=raw,value={{date 'YYYYMMDD'}}
68+
type=sha,enable=${{ github.event_name == 'pull_request' }}
69+
type=ref,event=pr
70+
labels: |
71+
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}/refs/heads/main/README.md
72+
org.opencontainers.image.created=${{ steps.date.outputs.date }}
73+
org.opencontainers.image.description=${{ env.IMAGE_DESC }}
74+
org.opencontainers.image.documentation=https://raw.githubusercontent.com/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}/refs/heads/main/README.md
75+
org.opencontainers.image.source=https://github.com/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}/blob/main/ContainerfileBETA
76+
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
77+
org.opencontainers.image.url=https://github.com/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
78+
org.opencontainers.image.vendor=${{ github.repository_owner }}
79+
org.opencontainers.image.version=latest
80+
io.artifacthub.package.deprecated=false
81+
io.artifacthub.package.keywords=bootc,ublue,universal-blue
82+
io.artifacthub.package.license=Apache-2.0
83+
io.artifacthub.package.logo-url=${{ env.ARTIFACTHUB_LOGO_URL }}
84+
io.artifacthub.package.prerelease=false
85+
containers.bootc=1
86+
sep-tags: " "
87+
sep-annotations: " "
88+
89+
- name: Build Image
90+
id: build_image
91+
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2
92+
with:
93+
containerfiles: |
94+
./ContainerfileBETA
95+
# Temporarily disabled
96+
# ./Containerfile-BETA
97+
# Postfix image name with -custom to make it a little more descriptive
98+
# Syntax: https://docs.github.com/en/actions/learn-github-actions/expressions#format
99+
image: ${{ env.IMAGE_NAME }}
100+
tags: ${{ steps.metadata.outputs.tags }}
101+
labels: ${{ steps.metadata.outputs.labels }}
102+
oci: false
103+
104+
# Rechunk is a script that we use on Universal Blue to make sure there isnt a single huge layer when your image gets published.
105+
# This does not make your image faster to download, just provides better resumability and fixes a few errors.
106+
# Documentation for Rechunk is provided on their github repository at https://github.com/hhd-dev/rechunk
107+
# You can enable it by uncommenting the following lines:
108+
# - name: Run Rechunker
109+
# id: rechunk
110+
# uses: hhd-dev/rechunk@f153348d8100c1f504dec435460a0d7baf11a9d2 # v1.1.1
111+
# with:
112+
# rechunk: 'ghcr.io/hhd-dev/rechunk:v1.0.1'
113+
# ref: "localhost/${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }}"
114+
# prev-ref: "${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }}"
115+
# skip_compression: true
116+
# version: ${{ env.CENTOS_VERSION }}
117+
# labels: ${{ steps.metadata.outputs.labels }} # Rechunk strips out all the labels during build, this needs to be reapplied here with newline separator
118+
119+
# This is necessary so that the podman socket can find the rechunked image on its storage
120+
# - name: Load in podman and tag
121+
# run: |
122+
# IMAGE=$(podman pull ${{ steps.rechunk.outputs.ref }})
123+
# sudo rm -rf ${{ steps.rechunk.outputs.output }}
124+
# for tag in ${{ steps.metadata.outputs.tags }}; do
125+
# podman tag $IMAGE ${{ env.IMAGE_NAME }}:$tag
126+
# done
127+
128+
# These `if` statements are so that pull requests for your custom images do not make it publish any packages under your name without you knowing
129+
# They also check if the runner is on the default branch so that things like the merge queue (if you enable it), are going to work
130+
- name: Login to GitHub Container Registry
131+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
132+
if: github.event_name != 'pull_request'
133+
with:
134+
registry: ghcr.io
135+
username: ${{ github.actor }}
136+
password: ${{ secrets.GITHUB_TOKEN }}
137+
138+
# Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR.
139+
# https://github.com/macbre/push-to-ghcr/issues/12
140+
- name: Lowercase Registry
141+
id: registry_case
142+
uses: ASzc/change-string-case-action@d0603cd0a7dd490be678164909f65c7737470a7f # v6
143+
with:
144+
string: ${{ env.IMAGE_REGISTRY }}
145+
146+
- name: Lowercase Image
147+
id: image_case
148+
uses: ASzc/change-string-case-action@d0603cd0a7dd490be678164909f65c7737470a7f # v6
149+
with:
150+
string: ${{ env.IMAGE_NAME }}
151+
152+
- name: Push To GHCR
153+
uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2
154+
# if: github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
155+
if: github.event_name != 'pull_request'
156+
id: push
157+
env:
158+
REGISTRY_USER: ${{ github.actor }}
159+
REGISTRY_PASSWORD: ${{ github.token }}
160+
with:
161+
registry: ${{ steps.registry_case.outputs.lowercase }}
162+
image: ${{ steps.image_case.outputs.lowercase }}
163+
tags: ${{ steps.metadata.outputs.tags }}
164+
username: ${{ env.REGISTRY_USER }}
165+
password: ${{ env.REGISTRY_PASSWORD }}
166+
167+
# This section is optional and only needs to be enabled if you plan on distributing
168+
# your project for others to consume. You will need to create a public and private key
169+
# using Cosign and save the private key as a repository secret in Github for this workflow
170+
# to consume. For more details, review the image signing section of the README.
171+
- name: Install Cosign
172+
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1
173+
if: github.event_name != 'pull_request'
174+
175+
- name: Sign container image
176+
if: github.event_name != 'pull_request'
177+
run: |
178+
IMAGE_FULL="${{ steps.registry_case.outputs.lowercase }}/${{ steps.image_case.outputs.lowercase }}"
179+
for tag in ${{ steps.metadata.outputs.tags }}; do
180+
cosign sign -y --key env://COSIGN_PRIVATE_KEY $IMAGE_FULL:$tag
181+
done
182+
env:
183+
TAGS: ${{ steps.push.outputs.digest }}
184+
COSIGN_EXPERIMENTAL: false
185+
COSIGN_PRIVATE_KEY: ${{ secrets.SIGNING_SECRET }}

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ jobs:
6767
type=raw,value={{date 'YYYYMMDD'}}
6868
type=sha,enable=${{ github.event_name == 'pull_request' }}
6969
type=ref,event=pr
70+
type=raw,value=42
7071
labels: |
7172
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}/refs/heads/main/README.md
7273
org.opencontainers.image.created=${{ steps.date.outputs.date }}

ContainerfileBETA

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Allow build scripts to be referenced without being copied into the final image
2+
FROM scratch AS ctx
3+
COPY build_files /
4+
5+
# Base Image
6+
FROM quay.io/fedora/fedora-kinoite:rawhide
7+
#RUN rpm-ostree cliwrap install-to-root /
8+
COPY system_files /
9+
10+
RUN mkdir -p /var/home/build && \
11+
ostree container commit
12+
13+
RUN mkdir -p /usr/share/aurorae/themes && \
14+
ostree container commit
15+
16+
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
17+
--mount=type=cache,dst=/var/cache \
18+
--mount=type=cache,dst=/var/log \
19+
--mount=type=tmpfs,dst=/tmp \
20+
/ctx/build-beta.sh && \
21+
ostree container commit
22+
23+
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
24+
--mount=type=cache,dst=/var/cache \
25+
--mount=type=cache,dst=/var/log \
26+
--mount=type=tmpfs,dst=/tmp \
27+
/ctx/branding-beta.sh && \
28+
ostree container commit
29+
30+
RUN rm -rf /tmp/* /var/* && \
31+
ostree container commit && \
32+
mkdir -p /tmp /var/tmp && \
33+
chmod 1777 /tmp /var/tmp && \
34+
ostree container commit
35+
36+
RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
37+
--mount=type=cache,dst=/var/cache \
38+
--mount=type=cache,dst=/var/log \
39+
--mount=type=tmpfs,dst=/tmp \
40+
systemctl enable initial-setup && \
41+
# ln -s /etc/systemd/system/graphical.target.wants/initial-setup.service /usr/lib/systemd/system/initial-setup.service && \
42+
# ln -s /etc/systemd/system/multi-user.target.wants/initial-setup.service /usr/lib/systemd/system/initial-setup.service && \
43+
ostree container commit
44+
45+
# RUN mkdir -p /etc/skel/ && \
46+
# # cp /etc/skel/* -Rv /var/home/*/ && \
47+
# cp /etc/skel/.* -Rv /var/home/*/ && \
48+
# ostree container commit
49+
50+
### LINTING
51+
## Verify final image and contents are correct.
52+
RUN bootc container lint
53+

Justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export repo_organization := env("GITHUB_REPOSITORY_OWNER", "Icycoide")
1+
export repo_organization := env("GITHUB_REPOSITORY_OWNER", "ArctineLabs")
22
export image_name := env("IMAGE_NAME", "tyrianos")
33
export centos_version := env("CENTOS_VERSION", "stream10")
44
export fedora_version := env("CENTOS_VERSION", "41")

0 commit comments

Comments
 (0)