1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00
build-container-installer/.github/workflows/iso.yml
Noel Miller 70bc2264ba
fix: tags not properly being set in ostree remote (#6)
* fix: tags are now properly set in remote after install
* refactor: kinoite variant is better as a default except for silverblue
* refactor: use docker to build ISO

---------

Co-authored-by: Benjamin Sherman <benjamin@holyarmy.org>
2024-02-16 14:45:19 -06:00

87 lines
2.3 KiB
YAML

name: Create and publish an ISO
on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
workflow_dispatch:
workflow_call:
inputs:
ARCH:
required: true
type: string
IMAGE_NAME:
required: true
type: string
IMAGE_REPO:
required: true
type: string
IMAGE_TAG:
required: true
type: string
VARIANT:
required: true
type: string
VERSION:
required: true
type: string
WEB_UI:
required: true
type: string
BUILD_REPO:
required: false
type: string
default: ublue-os/isogenerator
BUILD_REF:
required: false
type: string
default: main
env:
ARCH: ${{ inputs.ARCH || 'x86_64' }}
IMAGE_NAME: ${{ inputs.IMAGE_NAME || 'base-main' }}
IMAGE_REPO: ${{ inputs.IMAGE_REPO || 'ghcr.io/ublue-os' }}
IMAGE_TAG: ${{ inputs.IMAGE_TAG || 'latest' }}
VARIANT: ${{ inputs.VARIANT || 'Kinoite' }}
VERSION: ${{ inputs.VERSION || '39' }}
WEB_UI: ${{ inputs.WEB_UI || 'false' }}
CURR_REPO: ${{ inputs.BUILD_REPO || github.repository }}
CURR_REF: ${{ inputs.BUILD_REF || github.ref }}
jobs:
build-and-push-iso:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Build ISO
shell: bash
run: |
set -eo pipefail
mkdir -p output
docker run \
--rm --privileged \
-v ./output:/isogenerator/output \
-e ARCH="${{ env.ARCH }}" \
-e IMAGE_NAME="${{ env.IMAGE_NAME }}" \
-e IMAGE_REPO="${{ env.IMAGE_REPO }}" \
-e IMAGE_TAG="${{ env.IMAGE_TAG }}" \
-e VARIANT="${{ env.VARIANT }}" \
-e VERSION="${{ env.VERSION }}" \
-e WEB_UI="${{ env.WEB_UI }}" \
ghcr.io/ublue-os/isogenerator:latest
- name: Upload ISO as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_NAME }}-${{ env.IMAGE_TAG }}.iso
path: output/*.iso
if-no-files-found: error
retention-days: 0
compression-level: 0
overwrite: true