1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00

pull back updates from downstream

This commit is contained in:
Jason N. 2024-02-26 08:25:39 -05:00
parent feec50596a
commit c491c02d7c
11 changed files with 286 additions and 139 deletions

2
.github/CODEOWNERS vendored Normal file
View file

@ -0,0 +1,2 @@
# Default owner of code within this repo
* @JasonN3

View file

@ -8,40 +8,13 @@ on:
- '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
# Test Values
env:
IMAGE_VERSION: ${{ inputs.IMAGE_VERSION || '39' }}
IMAGE_ARCH: ${{ inputs.IMAGE_ARCH || 'x86_64' }}
IMAGE_NAME: ${{ inputs.IMAGE_NAME || 'base-main' }}
IMAGE_REPO: ${{ inputs.IMAGE_REPO || 'ghcr.io/ublue-os' }}
VARIANT: ${{ inputs.VARIANT || 'Silverblue' }}
CURR_REPO: ${{ inputs.BUILD_REPO || github.repository }}
CURR_REF: ${{ inputs.BUILD_REF || github.ref }}
ARCH: 'x86_64'
IMAGE_NAME: 'base'
IMAGE_REPO: 'quay.io/fedora-ostree-desktops'
VERSION: '39'
VARIANT: 'Server'
jobs:
build-and-push-iso:
@ -53,58 +26,29 @@ jobs:
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: Lowercase Registry
id: registry_case
uses: ASzc/change-string-case-action@v6
with:
string: ${{ env.IMAGE_REPO }}
- name: Download image
run: |
make container/${IMAGE_NAME}-${IMAGE_VERSION} \
arch=${IMAGE_ARCH} \
version=${IMAGE_VERSION} \
image_repo=${{ steps.registry_case.outputs.lowercase }} \
image_name=${IMAGE_NAME} \
variant=${VARIANT}
- name: Build ISO
uses: ./
with:
arch: ${{ env.ARCH}}
image_name: ${{ env.IMAGE_NAME}}
imagE_repo: ${{ env.IMAGE_REPO}}
version: ${{ env.VERSION }}
variant: ${{ env.VARIANT }}
- name: Create boot.iso
- name: Rename ISO
run: |
make boot.iso \
arch=${IMAGE_ARCH} \
version=${IMAGE_VERSION} \
image_repo=${{ steps.registry_case.outputs.lowercase }} \
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=${{ steps.registry_case.outputs.lowercase }} \
image_name=${IMAGE_NAME} \
variant=${VARIANT}
mkdir end_iso
mv ${IMAGE_NAME}-${IMAGE_VERSION}.iso end_iso/
mv build/deploy.iso ${{ env.IMAGE_NAME }}-${{ env.VERSION }}.iso
- name: Upload ISO as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_NAME }}-${{ env.IMAGE_VERSION }}.iso
name: ${{ env.IMAGE_NAME }}-${{ env.VERSION }}.iso
path: end_iso/*.iso
if-no-files-found: error
retention-days: 0