This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
fix: tags not properly being set in ostree remote #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create and publish an ISO | |
on: | |
push: | |
branches: | |
- 'main' | |
tags: | |
- 'v*' | |
pull_request: | |
workflow_dispatch: | |
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 | |
IMAGE_TAG: | |
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: ${{ inputs.IMAGE_VERSION || '39' }} | |
IMAGE_ARCH: ${{ inputs.IMAGE_ARCH || 'x86_64' }} | |
IMAGE_NAME: ${{ inputs.IMAGE_NAME || 'base-main' }} | |
IMAGE_TAG: ${{ inputs.IMAGE_TAG || 'latest' }} | |
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 }} | |
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: 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_TAG} \ | |
arch=${IMAGE_ARCH} \ | |
image_tag=${IMAGE_TAG} \ | |
image_repo=${{ steps.registry_case.outputs.lowercase }} \ | |
image_name=${IMAGE_NAME} \ | |
variant=${VARIANT} | |
- name: Create boot.iso | |
run: | | |
make boot.iso \ | |
arch=${IMAGE_ARCH} \ | |
version=${IMAGE_VERSION} \ | |
image_repo=${{ steps.registry_case.outputs.lowercase }} \ | |
image_tag=${IMAGE_TAG} | |
image_name=${IMAGE_NAME} \ | |
variant=${VARIANT} | |
- name: Create ${IMAGE_NAME}-${IMAGE_TAG} | |
run: | | |
make ${IMAGE_NAME}-${IMAGE_TAG}.iso \ | |
arch=${IMAGE_ARCH} \ | |
version=${IMAGE_VERSION} \ | |
image_repo=${{ steps.registry_case.outputs.lowercase }} \ | |
image_tag=${IMAGE_TAG} | |
image_name=${IMAGE_NAME} \ | |
variant=${VARIANT} | |
mkdir end_iso | |
mv output/${IMAGE_NAME}-${IMAGE_TAG}.iso end_iso/ | |
- name: Upload ISO as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.IMAGE_NAME }}-${{ env.IMAGE_TAG }}.iso | |
path: end_iso/*.iso | |
if-no-files-found: error | |
retention-days: 0 | |
compression-level: 0 | |
overwrite: true |