mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +01:00
POC of OS Install
This commit is contained in:
parent
b63b229c4f
commit
9d5ef0c115
6 changed files with 216 additions and 0 deletions
107
.github/workflows/iso.yml
vendored
Normal file
107
.github/workflows/iso.yml
vendored
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
name: Create and publish an ISO
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
|
||||
workflow_call:
|
||||
inputs:
|
||||
IMAGE_VERSION:
|
||||
required: true
|
||||
type: string
|
||||
IMAGE_ARCH:
|
||||
required: true
|
||||
type: string
|
||||
IMAGE_NAME:
|
||||
required: true
|
||||
type: string
|
||||
IMAGE_REPO:
|
||||
required: true
|
||||
type: string
|
||||
VARIANT:
|
||||
required: true
|
||||
type: string
|
||||
BUILD_REPO:
|
||||
required: false
|
||||
type: string
|
||||
default: JasonN3/container-installer
|
||||
BUILD_REF:
|
||||
required: false
|
||||
type: string
|
||||
default: main
|
||||
|
||||
env:
|
||||
IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '39' }}
|
||||
IMAGE_ARCH: ${{ github.event.inputs.IMAGE_ARCH || 'x86_64' }}
|
||||
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'base-main' }}
|
||||
IMAGE_REPO: ${{ github.event.inputs.IMAGE_REPO || 'ghcr.io/ublue-os' }}
|
||||
VARIANT: ${{ github.event.inputs.VARIANT || 'Silverblue' }}
|
||||
CURR_REPO: ${{ github.event.inputs.BUILD_REPO || github.repository }}
|
||||
CURR_REF: ${{ github.event.inputs.BUILD_REF || github.ref }}
|
||||
|
||||
jobs:
|
||||
build-and-push-iso:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: fedora:39
|
||||
options: "--privileged"
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Install make and git
|
||||
run: dnf install -y make git
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ env.CURR_REPO }}
|
||||
ref: ${{ env.CURR_REF }}
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: make install-deps
|
||||
|
||||
- name: Download image
|
||||
run: |
|
||||
make container/${IMAGE_NAME}-${IMAGE_VERSION} \
|
||||
arch=${IMAGE_ARCH} \
|
||||
version=${IMAGE_VERSION} \
|
||||
image_repo=${IMAGE_REPO} \
|
||||
image_name=${IMAGE_NAME} \
|
||||
variant=${VARIANT}
|
||||
|
||||
- name: Create boot.iso
|
||||
run: |
|
||||
make boot.iso \
|
||||
arch=${IMAGE_ARCH} \
|
||||
version=${IMAGE_VERSION} \
|
||||
image_repo=${IMAGE_REPO} \
|
||||
image_name=${IMAGE_NAME} \
|
||||
variant=${VARIANT}
|
||||
|
||||
- name: Create deploy.iso
|
||||
run: |
|
||||
make ${IMAGE_NAME}-${IMAGE_VERSION}.iso \
|
||||
arch=${IMAGE_ARCH} \
|
||||
version=${IMAGE_VERSION} \
|
||||
image_repo=${IMAGE_REPO} \
|
||||
image_name=${IMAGE_NAME} \
|
||||
variant=${VARIANT}
|
||||
mkdir end_iso
|
||||
mv ${IMAGE_NAME}-${IMAGE_VERSION}.iso end_iso/
|
||||
|
||||
- name: Upload ISO as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ISOs
|
||||
path: end_iso/*.iso
|
||||
if-no-files-found: error
|
||||
retention-days: 0
|
||||
compression-level: 0
|
||||
overwrite: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue