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

Compare commits

..

No commits in common. "main" and "v1.2.0" have entirely different histories.
main ... v1.2.0

43 changed files with 339 additions and 613 deletions

View file

@ -1,2 +0,0 @@
all
rule 'MD033', :allowed_elements => ["a","img","picture","source"]

View file

@ -12,7 +12,6 @@ A clear and concise description of what the bug is.
**To Reproduce** **To Reproduce**
Steps to reproduce the behavior: Steps to reproduce the behavior:
1. Go to '...' 1. Go to '...'
2. Click on '....' 2. Click on '....'
3. Scroll down to '....' 3. Scroll down to '....'
@ -25,7 +24,6 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem. If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):** **Desktop (please complete the following information):**
- OS: [e.g. iOS] - OS: [e.g. iOS]
- Version [e.g. 22] - Version [e.g. 22]

View file

@ -26,7 +26,7 @@ jobs:
statuses: write statuses: write
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v5 uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
fetch-depth: 0 fetch-depth: 0
@ -72,7 +72,6 @@ jobs:
tags: | tags: |
type=ref,event=branch type=ref,event=branch
type=ref,event=pr type=ref,event=pr
type=raw,value=${{ github.sha }}
type=semver,pattern=v{{version}} type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}} type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}.{{minor}}.{{patch}} type=semver,pattern=v{{major}}.{{minor}}.{{patch}}
@ -86,7 +85,6 @@ jobs:
ghcr.io/${{ github.repository }} ghcr.io/${{ github.repository }}
tags: | tags: |
pr-${{ inputs.pr }} pr-${{ inputs.pr }}
${{ github.sha }}
- name: Buildah Build - name: Buildah Build
id: build-image id: build-image
@ -96,13 +94,6 @@ jobs:
tags: ${{ steps.meta.outputs.tags || steps.meta_pr.outputs.tags }} tags: ${{ steps.meta.outputs.tags || steps.meta_pr.outputs.tags }}
labels: ${{ steps.meta.outputs.labels || steps.meta_pr.outputs.labels }} labels: ${{ steps.meta.outputs.labels || steps.meta_pr.outputs.labels }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push image - name: Push image
uses: redhat-actions/push-to-registry@v2 uses: redhat-actions/push-to-registry@v2
with: with:
@ -120,25 +111,3 @@ jobs:
context: ${{ env.JOB_NAME }} context: ${{ env.JOB_NAME }}
sha: ${{ env.sha }} sha: ${{ env.sha }}
targetUrl: ${{ steps.jobs.outputs.html_url }} targetUrl: ${{ steps.jobs.outputs.html_url }}
- name: Install Cosign
if: startsWith(github.ref, 'refs/tags/v')
uses: sigstore/cosign-installer@v3.10.0
- name: Sign the images
if: startsWith(github.ref, 'refs/tags/v')
env:
TAGS: ${{ steps.build-image.outputs.tags }}
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
run: |
images=""
digest=""
for tag in ${TAGS}; do
if [[ -z "${digest}" ]]
then
digest=$(cat $(echo ${tag} | tr '/:' '--')_digest.txt)
fi
images+="${tag}@${digest} "
done
cosign sign --key env://COSIGN_PRIVATE_KEY --yes ${images}

View file

@ -9,6 +9,15 @@ on:
parent_job_name: parent_job_name:
required: true required: true
type: string type: string
flatpaks_refs:
required: false
type: string
flatpaks_refs_dir:
required: false
type: string
suffix:
required: false
type: string
jobs: jobs:
load_vars: load_vars:
@ -29,10 +38,11 @@ jobs:
continue-on-error: false continue-on-error: false
strategy: strategy:
fail-fast: false fail-fast: false
matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }} matrix:
version: ${{ fromJson(needs.load_vars.outputs.BUILD_VERSIONS) }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v5 uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
@ -53,7 +63,7 @@ jobs:
id: jobs id: jobs
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }})"
per_page: 100 per_page: 100
- name: Set status - name: Set status
@ -62,7 +72,7 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
status: pending status: pending
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" context: ${{ env.JOB_NAME }} (${{ matrix.version }})
sha: ${{ env.sha }} sha: ${{ env.sha }}
targetUrl: ${{ steps.jobs.outputs.html_url }} targetUrl: ${{ steps.jobs.outputs.html_url }}
@ -105,28 +115,25 @@ jobs:
id: build id: build
with: with:
arch: ${{ needs.load_vars.outputs.ARCH }} arch: ${{ needs.load_vars.outputs.ARCH }}
image_name: ${{ matrix.image_name }} image_name: ${{ needs.load_vars.outputs.IMAGE_NAME }}
image_repo: ${{ matrix.image_repo}} image_repo: ${{ needs.load_vars.outputs.IMAGE_REPO }}
image_src: ${{ matrix.image_src }}
image_tag: ${{ matrix.version }} image_tag: ${{ matrix.version }}
version: ${{ matrix.version }} version: ${{ matrix.version }}
repos: ${{ matrix.repos }}
variant: ${{ needs.load_vars.outputs.VARIANT }} variant: ${{ needs.load_vars.outputs.VARIANT }}
flatpak_remote_refs: ${{ matrix.flatpaks == 'flatpak_refs' && needs.load_vars.outputs.FLATPAK_REMOTE_REFS || '' }} flatpak_remote_refs: ${{ inputs.flatpaks_refs }}
flatpak_remote_refs_dir: ${{ matrix.flatpaks == 'flatpak_refs_dir' && needs.load_vars.outputs.FLATPAK_REMOTE_REFS_DIR || '' }} flatpak_remote_refs_dir: ${{ inputs.flatpaks_refs_dir }}
secure_boot_key_url: ${{ needs.load_vars.outputs.SECURE_BOOT_KEY_URL }} secure_boot_key_url: ${{ needs.load_vars.outputs.SECURE_BOOT_KEY_URL }}
enrollment_password: ${{ needs.load_vars.outputs.ENROLLMENT_PASSWORD }} enrollment_password: ${{ needs.load_vars.outputs.ENROLLMENT_PASSWORD }}
iso_name: build/${{ matrix.image_name }}-${{ matrix.version }}${{ matrix.flatpaks == 'false' && '' || format('-{0}', matrix.flatpaks) }}.iso iso_name: build/${{ needs.load_vars.outputs.IMAGE_NAME }}-${{ matrix.version }}${{ inputs.suffix && format('-{0}', inputs.suffix || '') }}.iso
- name: Upload ISO as artifact - name: Upload ISO as artifact
if: matrix.version != 'fake'
id: upload id: upload
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: ${{ matrix.image_name }}-${{ matrix.version }}${{ matrix.flatpaks == 'false' && '' || format('-{0}', matrix.flatpaks) }} name: ${{ needs.load_vars.outputs.IMAGE_NAME }}-${{ matrix.version }}${{ inputs.suffix && format('-{0}', inputs.suffix || '') }}
path: | path: |
build/${{ matrix.image_name }}-${{ matrix.version }}${{ matrix.flatpaks == 'false' && '' || format('-{0}', matrix.flatpaks) }}.iso build/${{ needs.load_vars.outputs.IMAGE_NAME }}-${{ matrix.version }}${{ inputs.suffix && format('-{0}', inputs.suffix || '') }}.iso
build/${{ matrix.image_name }}-${{ matrix.version }}${{ matrix.flatpaks == 'false' && '' || format('-{0}', matrix.flatpaks) }}.iso-CHECKSUM build/${{ needs.load_vars.outputs.IMAGE_NAME }}-${{ matrix.version }}${{ inputs.suffix && format('-{0}', inputs.suffix || '') }}.iso-CHECKSUM
if-no-files-found: error if-no-files-found: error
retention-days: 0 retention-days: 0
compression-level: 0 compression-level: 0
@ -138,7 +145,7 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }} status: ${{ job.status }}
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" context: ${{ env.JOB_NAME }} (${{ matrix.version }})
sha: ${{ env.sha }} sha: ${{ env.sha }}
targetUrl: ${{ steps.jobs.outputs.html_url }} targetUrl: ${{ steps.jobs.outputs.html_url }}

View file

@ -5,67 +5,18 @@ on:
outputs: outputs:
ARCH: ARCH:
value: 'x86_64' value: 'x86_64'
BUILD_MATRIX: BUILD_VERSIONS:
value: ' value: '[38, 39, 40]'
{ IMAGE_NAME:
"version": [ value: 'base'
"41", IMAGE_REPO:
"42", value: 'quay.io/fedora-ostree-desktops'
"43" IMAGE_TAG:
], value: '39'
"flatpaks": [
"false",
"flatpak_refs_dir",
"flatpak_refs"
],
"image_repo": [
"ghcr.io/ublue-os",
"quay.io/fedora",
"quay.io/fedora-ostree-desktops"
],
"include": [
{
"image_repo": "ghcr.io/ublue-os",
"image_name": "base-main",
},
{
"image_repo": "quay.io/fedora",
"image_name": "fedora-bootc"
},
{
"image_repo": "quay.io/fedora-ostree-desktops",
"image_name": "base-atomic"
}
],
"exclude": [
{
"image_repo": "quay.io/fedora",
"flatpaks": "flatpak_refs_dir"
},
{
"image_repo": "quay.io/fedora",
"flatpaks": "flatpak_refs"
},
{
"image_repo": "quay.io/fedora-ostree-desktops",
"flatpaks": "flatpak_refs_dir"
},
{
"image_repo": "quay.io/fedora-ostree-desktops",
"flatpaks": "flatpak_refs"
},
{
"image_repo": "ghcr.io/ublue-os",
"version": "43"
}
]
}'
VARIANT: VARIANT:
value: 'Server' value: 'Server'
FLATPAK_REMOTE_REFS_DIR: FLATPAK_REMOTE_REFS_DIR:
value: flatpak_refs value: flatpak_refs
FLATPAK_REMOTE_REFS:
value: "app/org.mozilla.firefox/x86_64/stable app/org.videolan.VLC/x86_64/stable"
SECURE_BOOT_KEY_URL: SECURE_BOOT_KEY_URL:
value: 'https://github.com/ublue-os/akmods/raw/main/certs/public_key.der' value: 'https://github.com/ublue-os/akmods/raw/main/certs/public_key.der'
ENROLLMENT_PASSWORD: ENROLLMENT_PASSWORD:

View file

@ -1,7 +1,7 @@
name: Clean Container Registry name: Clean Container Registry
on: on:
# schedule: schedule:
# - cron: '0 21 * * 0' - cron: '0 21 * * 0'
workflow_dispatch: workflow_dispatch:
@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Delete Untagged Packages - name: Delete Untagged Packages
uses: Chizkiyahu/delete-untagged-ghcr-action@v5 uses: Chizkiyahu/delete-untagged-ghcr-action@v4
with: with:
token: ${{ secrets.PACKAGE_DELETER }} token: ${{ secrets.PACKAGE_DELETER }}
repository_owner: ${{ github.repository_owner }} repository_owner: ${{ github.repository_owner }}

View file

@ -9,6 +9,15 @@ on:
parent_job_name: parent_job_name:
required: true required: true
type: string type: string
flatpaks_refs:
required: false
type: string
flatpaks_refs_dir:
required: false
type: string
suffix:
required: false
type: string
jobs: jobs:
load_vars: load_vars:
@ -28,10 +37,11 @@ jobs:
continue-on-error: false continue-on-error: false
strategy: strategy:
fail-fast: false fail-fast: false
matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }} matrix:
version: ${{ fromJson(needs.load_vars.outputs.BUILD_VERSIONS) }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v5 uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
@ -52,7 +62,7 @@ jobs:
id: jobs id: jobs
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }})"
per_page: 100 per_page: 100
- name: Set status - name: Set status
@ -61,7 +71,7 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
status: pending status: pending
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" context: ${{ env.JOB_NAME }} (${{ matrix.version }})
sha: ${{ env.sha }} sha: ${{ env.sha }}
targetUrl: ${{ steps.jobs.outputs.html_url }} targetUrl: ${{ steps.jobs.outputs.html_url }}
@ -74,7 +84,7 @@ jobs:
- name: Download generated ISO - name: Download generated ISO
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: ${{ matrix.image_name }}-${{ matrix.version }}${{ matrix.flatpaks == 'false' && '' || format('-{0}', matrix.flatpaks) }} name: ${{ format('{0}-{1}', needs.load_vars.outputs.IMAGE_NAME, matrix.version) }}${{ inputs.suffix && format('-{0}', inputs.suffix || '') }}
- name: Run VM Tests - name: Run VM Tests
env: env:
@ -83,23 +93,18 @@ jobs:
VM_IP: "127.0.0.1" VM_IP: "127.0.0.1"
VM_PORT: "5555" VM_PORT: "5555"
run: | run: |
make test/vm \ make test/vm ISO_NAME=${{ format('{0}-{1}', needs.load_vars.outputs.IMAGE_NAME, matrix.version) }}${{ inputs.suffix && format('-{0}', inputs.suffix || '') }}.iso \
VM_IP=${VM_IP} VM_PORT=${VM_PORT} VM_USER=${VM_USER} VM_PASS=${VM_PASS} \
ARCH=${{ needs.load_vars.outputs.ARCH}} \ ARCH=${{ needs.load_vars.outputs.ARCH}} \
ENROLLMENT_PASSWORD=${{ needs.load_vars.outputs.ENROLLMENT_PASSWORD }} \ IMAGE_NAME=${{ needs.load_vars.outputs.IMAGE_NAME}} \
${{ matrix.flatpaks == 'flatpak_refs' && format('FLATPAK_REMOTE_REFS="{0}"', needs.load_vars.outputs.FLATPAK_REMOTE_REFS) || '' }} \ IMAGE_REPO=${{ needs.load_vars.outputs.IMAGE_REPO}} \
${{ matrix.flatpaks == 'flatpak_refs_dir' && format('FLATPAK_REMOTE_REFS_DIR="{0}"', needs.load_vars.outputs.FLATPAK_REMOTE_REFS_DIR) || '' }} \
IMAGE_NAME=${{ matrix.image_name }} \
IMAGE_REPO=${{ matrix.image_repo }} \
IMAGE_TAG=${{ matrix.version }} \ IMAGE_TAG=${{ matrix.version }} \
ISO_NAME=${{ matrix.image_name }}-${{ matrix.version }}${{ matrix.flatpaks == 'false' && '' || format('-{0}', matrix.flatpaks) }}.iso \
${{ matrix.repos != '' && format('REPOS="{0}"', matrix.repos) || '' }} \
SECURE_BOOT_KEY_URL=${{ needs.load_vars.outputs.SECURE_BOOT_KEY_URL }} \
VARIANT=${{ needs.load_vars.outputs.VARIANT }} \
VERSION=${{ matrix.version }} \ VERSION=${{ matrix.version }} \
VM_IP=${VM_IP} \ VARIANT=${{ needs.load_vars.outputs.VARIANT }} \
VM_PASS=${VM_PASS} \ ${{ inputs.flatpaks_refs && format('FLATPAK_REMOTE_REFS="{0}"', inputs.flatpaks_refs) || '' }} \
VM_PORT=${VM_PORT} \ ${{ inputs.flatpaks_refs_dir && format('FLATPAK_REMOTE_REFS_DIR="{0}"', inputs.flatpaks_refs_dir) || '' }} \
VM_USER=${VM_USER} SECURE_BOOT_KEY_URL=${{ needs.load_vars.outputs.SECURE_BOOT_KEY_URL }} \
ENROLLMENT_PASSWORD=${{ needs.load_vars.outputs.ENROLLMENT_PASSWORD }}
- name: Set status - name: Set status
if: inputs.pr && always() if: inputs.pr && always()
@ -107,6 +112,6 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }} status: ${{ job.status }}
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" context: ${{ env.JOB_NAME }} (${{ matrix.version }})
sha: ${{ env.sha }} sha: ${{ env.sha }}
targetUrl: ${{ steps.jobs.outputs.html_url }} targetUrl: ${{ steps.jobs.outputs.html_url }}

View file

@ -9,6 +9,15 @@ on:
parent_job_name: parent_job_name:
required: true required: true
type: string type: string
flatpaks_refs:
required: false
type: string
flatpaks_refs_dir:
required: false
type: string
suffix:
required: false
type: string
jobs: jobs:
load_vars: load_vars:
@ -28,10 +37,11 @@ jobs:
continue-on-error: false continue-on-error: false
strategy: strategy:
fail-fast: false fail-fast: false
matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }} matrix:
version: ${{ fromJson(needs.load_vars.outputs.BUILD_VERSIONS) }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v5 uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
@ -52,7 +62,7 @@ jobs:
id: jobs id: jobs
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }})"
per_page: 100 per_page: 100
- name: Set status - name: Set status
@ -61,7 +71,7 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
status: pending status: pending
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" context: ${{ env.JOB_NAME }} (${{ matrix.version }})
sha: ${{ env.sha }} sha: ${{ env.sha }}
targetUrl: ${{ steps.jobs.outputs.html_url }} targetUrl: ${{ steps.jobs.outputs.html_url }}
@ -74,23 +84,22 @@ jobs:
- name: Download generated ISO - name: Download generated ISO
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: ${{ matrix.image_name }}-${{ matrix.version }}${{ matrix.flatpaks == 'false' && '' || format('-{0}', matrix.flatpaks) }} name: ${{ format('{0}-{1}', needs.load_vars.outputs.IMAGE_NAME, matrix.version) }}${{ inputs.suffix && format('-{0}', inputs.suffix || '') }}
- name: Run ISO checks - name: Run ISO checks
run: | run: |
make test/iso \ make test/iso \
ARCH=${{ needs.load_vars.outputs.ARCH}} \ ARCH=${{ needs.load_vars.outputs.ARCH}} \
ENROLLMENT_PASSWORD=${{ needs.load_vars.outputs.ENROLLMENT_PASSWORD }} \ IMAGE_NAME=${{ needs.load_vars.outputs.IMAGE_NAME}} \
${{ matrix.flatpaks == 'flatpak_refs' && format('FLATPAK_REMOTE_REFS="{0}"', needs.load_vars.outputs.FLATPAK_REMOTE_REFS) || '' }} \ IMAGE_REPO=${{ needs.load_vars.outputs.IMAGE_REPO}} \
${{ matrix.flatpaks == 'flatpak_refs_dir' && format('FLATPAK_REMOTE_REFS_DIR="{0}"', needs.load_vars.outputs.FLATPAK_REMOTE_REFS_DIR) || '' }} \
IMAGE_NAME=${{ matrix.image_name }} \
IMAGE_REPO=${{ matrix.image_repo }} \
IMAGE_TAG=${{ matrix.version }} \ IMAGE_TAG=${{ matrix.version }} \
ISO_NAME=${{ matrix.image_name }}-${{ matrix.version }}${{ matrix.flatpaks == 'false' && '' || format('-{0}', matrix.flatpaks) }}.iso \ VERSION=${{ matrix.version }} \
${{ matrix.repos != '' && format('REPOS="{0}"', matrix.repos) || '' }} \
SECURE_BOOT_KEY_URL=${{ needs.load_vars.outputs.SECURE_BOOT_KEY_URL }} \
VARIANT=${{ needs.load_vars.outputs.VARIANT }} \ VARIANT=${{ needs.load_vars.outputs.VARIANT }} \
VERSION=${{ matrix.version }} ${{ inputs.flatpaks_refs && format('FLATPAK_REMOTE_REFS="{0}"', inputs.flatpaks_refs) || '' }} \
${{ inputs.flatpaks_refs_dir && format('FLATPAK_REMOTE_REFS_DIR="{0}"', inputs.flatpaks_refs_dir) || '' }} \
SECURE_BOOT_KEY_URL=${{ needs.load_vars.outputs.SECURE_BOOT_KEY_URL }} \
ENROLLMENT_PASSWORD=${{ needs.load_vars.outputs.ENROLLMENT_PASSWORD }} \
ISO_NAME=${{ format('{0}-{1}', needs.load_vars.outputs.IMAGE_NAME, matrix.version) }}${{ inputs.suffix && format('-{0}', inputs.suffix || '') }}.iso
- name: Set status - name: Set status
if: inputs.pr && always() if: inputs.pr && always()
@ -98,6 +107,6 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }} status: ${{ job.status }}
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" context: ${{ env.JOB_NAME }} (${{ matrix.version }})
sha: ${{ env.sha }} sha: ${{ env.sha }}
targetUrl: ${{ steps.jobs.outputs.html_url }} targetUrl: ${{ steps.jobs.outputs.html_url }}

View file

@ -20,7 +20,7 @@ jobs:
contents: read contents: read
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v5 uses: actions/checkout@v4
- name: Run test - name: Run test
run: | run: |

View file

@ -27,34 +27,99 @@ jobs:
build_container: build_container:
name: Build Container name: Build Container
uses: ./.github/workflows/build_container.yml uses: ./.github/workflows/build_container.yml
secrets: inherit
with: with:
pr: ${{ inputs.pr }} pr: ${{ inputs.pr }}
parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Build Container parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Build Container
build_isos: build_iso_flatpaks:
name: Build ISOs name: Build ISO with Flatpaks
needs: needs:
- build_container - build_container
uses: ./.github/workflows/build_iso.yml uses: ./.github/workflows/build_iso.yml
with: with:
pr: ${{ inputs.pr }} pr: ${{ inputs.pr }}
parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Build ISOs parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Build ISO with Flatpaks
flatpaks_refs_dir: flatpak_refs
suffix: flatpaks
test_isos: test_iso_flatpaks:
name: Test ISOs name: Test ISO with Flatpaks
needs: needs:
- build_isos - build_iso_flatpaks
uses: ./.github/workflows/test_iso.yml uses: ./.github/workflows/test_iso.yml
with: with:
pr: ${{ inputs.pr }} pr: ${{ inputs.pr }}
parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Test ISOs parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Test ISO with Flatpaks
flatpaks_refs_dir: flatpak_refs
suffix: flatpaks
test_deployments: test_deployment_flatpaks:
name: Test Deployments name: Test Deployment with Flatpaks
needs: needs:
- build_isos - build_iso_flatpaks
uses: ./.github/workflows/test_deployment.yml uses: ./.github/workflows/test_deployment.yml
with: with:
pr: ${{ inputs.pr }} pr: ${{ inputs.pr }}
parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Test Deployments parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Test Deployment with Flatpaks
flatpaks_refs_dir: flatpak_refs
suffix: flatpaks
build_iso_flatpak_refs:
name: Build ISO with Flatpak Refs
needs:
- build_container
uses: ./.github/workflows/build_iso.yml
with:
pr: ${{ inputs.pr }}
parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Build ISO with Flatpak Refs
flatpaks_refs: "app/org.mozilla.firefox/x86_64/stable app/org.videolan.VLC/x86_64/stable"
suffix: flatpaks_refs
test_iso_flatpak_refs:
name: Test ISO with Flatpak Refs
needs:
- build_iso_flatpak_refs
uses: ./.github/workflows/test_iso.yml
with:
pr: ${{ inputs.pr }}
parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Test ISO with Flatpak Refs
flatpaks_refs: "app/org.mozilla.firefox/x86_64/stable app/org.videolan.VLC/x86_64/stable"
suffix: flatpaks_refs
test_deployment_flatpak_refs:
name: Test Deployment with Flatpak Refs
needs:
- build_iso_flatpak_refs
uses: ./.github/workflows/test_deployment.yml
with:
pr: ${{ inputs.pr }}
parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Test Deployment with Flatpak Refs
flatpaks_refs: "app/org.mozilla.firefox/x86_64/stable app/org.videolan.VLC/x86_64/stable"
suffix: flatpaks_refs
build_iso:
name: Build ISO
needs:
- build_container
uses: ./.github/workflows/build_iso.yml
with:
pr: ${{ inputs.pr }}
parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Build ISO
test_iso:
name: Test ISO
needs:
- build_iso
uses: ./.github/workflows/test_iso.yml
with:
pr: ${{ inputs.pr }}
parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Test ISO
test_deployment:
name: Test Deployment
needs:
- build_iso
uses: ./.github/workflows/test_deployment.yml
with:
pr: ${{ inputs.pr }}
parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Test Deployment

View file

@ -1,50 +0,0 @@
name: Update Wiki
on:
push:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/update_wiki.yml'
jobs:
update-wiki:
name: Update Wiki
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Install packages
run: |
sudo apt install -y make rsync
# Checkout Main Repo
- uses: actions/checkout@v5
# Checkout Wiki Repo
- uses: actions/checkout@v5
with:
repository: ${{github.repository}}.wiki
persist-credentials: true
path: wiki
ref: master
# Generate final files
- name: Generate Files
run: |
cd ${GITHUB_WORKSPACE}/docs
make
# Copy Docs
- name: Copy files
run: |
rsync -av --exclude='.git/*' ${GITHUB_WORKSPACE}/docs/ ${GITHUB_WORKSPACE}/wiki/
# Push Changes
- name: Push changes
run: |
cd ${GITHUB_WORKSPACE}/wiki/
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Add changes"
git push

2
.gitmodules vendored
View file

@ -1,7 +1,7 @@
[submodule "external/fedora-lorax-templates"] [submodule "external/fedora-lorax-templates"]
path = external/fedora-lorax-templates path = external/fedora-lorax-templates
url = https://pagure.io/fedora-lorax-templates.git url = https://pagure.io/fedora-lorax-templates.git
branch = f40 branch = f39
[submodule "external/lorax"] [submodule "external/lorax"]
path = external/lorax path = external/lorax
url = https://github.com/weldr/lorax.git url = https://github.com/weldr/lorax.git

1
.mdlrc
View file

@ -1 +0,0 @@
style "#{File.dirname(__FILE__)}/.codacy/markdownlint.rb"

View file

@ -1,5 +1,5 @@
{ {
"files.associations": { "files.associations": {
"Makefile.inputs": "makefile" "Makefile.*": "makefile"
} }
} }

View file

@ -1,6 +1,6 @@
FROM fedora:42 FROM fedora:40
ARG VERSION=42 ARG VERSION=39
ENV ARCH="x86_64" ENV ARCH="x86_64"
ENV IMAGE_NAME="base" ENV IMAGE_NAME="base"

View file

@ -27,25 +27,24 @@ export install_pkg
_IMAGE_REPO_ESCAPED := $(subst /,\/,$(IMAGE_REPO)) _IMAGE_REPO_ESCAPED := $(subst /,\/,$(IMAGE_REPO))
_IMAGE_REPO_DOUBLE_ESCAPED := $(subst \,\\\,$(_IMAGE_REPO_ESCAPED)) _IMAGE_REPO_DOUBLE_ESCAPED := $(subst \,\\\,$(_IMAGE_REPO_ESCAPED))
_LORAX_ARGS := _LORAX_ARGS :=
export _LORAX_TEMPLATES := $(call get_templates,install) lorax_templates/install_include_post.tmpl _LORAX_TEMPLATES := $(call get_templates,install)
_REPO_FILES := $(subst /etc/yum.repos.d,repos,$(REPOS)) _REPO_FILES := $(subst /etc/yum.repos.d,repos,$(REPOS))
_TEMP_DIR := $(shell mktemp -d) _TEMP_DIR := $(shell mktemp -d)
_TEMPLATE_VARS := ARCH IMAGE_NAME IMAGE_REPO _IMAGE_REPO_DOUBLE_ESCAPED _IMAGE_REPO_ESCAPED IMAGE_SIGNED IMAGE_TAG REPOS _RHEL VARIANT VERSION WEB_UI _TEMPLATE_VARS := ARCH IMAGE_NAME IMAGE_REPO _IMAGE_REPO_DOUBLE_ESCAPED _IMAGE_REPO_ESCAPED IMAGE_TAG REPOS _RHEL VARIANT VERSION WEB_UI
_VOLID := $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$(IMAGE_TAG) _VOLID := $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$(IMAGE_TAG)
ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo) ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo)
export _RHEL := true _RHEL := true
export _LORAX_TEMPLATES += $(call get_templates,rhel)
else else
undefine _RHEL _RHEL := false
endif endif
ifeq ($(_RHEL),true) ifeq ($(_RHEL),true)
_LORAX_ARGS += --nomacboot --noupgrade _LORAX_ARGS += --nomacboot --noupgrade
else ifeq ($(VARIANT),Server) else ifeq ($(VARIANT),Server)
_LORAX_ARGS += --macboot --noupgrade --squashfs-only _LORAX_ARGS += --macboot --noupgrade
else else
_LORAX_ARGS += --nomacboot --squashfs-only _LORAX_ARGS += --nomacboot
endif endif
ifeq ($(WEB_UI),true) ifeq ($(WEB_UI),true)
@ -54,7 +53,7 @@ endif
ifneq ($(DNF_CACHE),) ifneq ($(DNF_CACHE),)
_LORAX_ARGS += --cachedir $(DNF_CACHE) _LORAX_ARGS += --cachedir $(DNF_CACHE)
export _LORAX_TEMPLATES += $(call get_templates,cache) _LORAX_TEMPLATES += $(call get_templates,cache)
_TEMPLATE_VARS += DNF_CACHE _TEMPLATE_VARS += DNF_CACHE
endif endif
@ -62,7 +61,7 @@ ifneq ($(FLATPAK_DIR),)
_FLATPAK_REPO_GPG := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2) _FLATPAK_REPO_GPG := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2)
export _FLATPAK_REPO_URL := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2) export _FLATPAK_REPO_URL := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2)
_LORAX_ARGS += -i flatpak-libs _LORAX_ARGS += -i flatpak-libs
export _LORAX_TEMPLATES += $(call get_templates,flatpak) _LORAX_TEMPLATES += $(call get_templates,flatpak)
_TEMPLATE_VARS += FLATPAK_DIR FLATPAK_REMOTE_NAME FLATPAK_REMOTE_REFS FLATPAK_REMOTE_URL _FLATPAK_REPO_GPG _FLATPAK_REPO_URL _TEMPLATE_VARS += FLATPAK_DIR FLATPAK_REMOTE_NAME FLATPAK_REMOTE_REFS FLATPAK_REMOTE_URL _FLATPAK_REPO_GPG _FLATPAK_REPO_URL
else else
ifneq ($(FLATPAK_REMOTE_REFS_DIR),) ifneq ($(FLATPAK_REMOTE_REFS_DIR),)
@ -74,7 +73,7 @@ ifneq ($(FLATPAK_REMOTE_REFS),)
_FLATPAK_REPO_GPG := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2) _FLATPAK_REPO_GPG := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2)
export _FLATPAK_REPO_URL := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2) export _FLATPAK_REPO_URL := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2)
_LORAX_ARGS += -i flatpak-libs _LORAX_ARGS += -i flatpak-libs
export _LORAX_TEMPLATES += $(call get_templates,flatpak) \ _LORAX_TEMPLATES += $(call get_templates,flatpak) \
external/fedora-lorax-templates/ostree-based-installer/lorax-embed-flatpaks.tmpl external/fedora-lorax-templates/ostree-based-installer/lorax-embed-flatpaks.tmpl
_TEMPLATE_VARS += FLATPAK_DIR FLATPAK_REMOTE_NAME FLATPAK_REMOTE_REFS FLATPAK_REMOTE_URL _FLATPAK_REPO_GPG _FLATPAK_REPO_URL _TEMPLATE_VARS += FLATPAK_DIR FLATPAK_REMOTE_NAME FLATPAK_REMOTE_REFS FLATPAK_REMOTE_URL _FLATPAK_REPO_GPG _FLATPAK_REPO_URL
endif endif
@ -82,7 +81,7 @@ endif
ifneq ($(SECURE_BOOT_KEY_URL),) ifneq ($(SECURE_BOOT_KEY_URL),)
export _LORAX_TEMPLATES += $(call get_templates,secureboot) _LORAX_TEMPLATES += $(call get_templates,secureboot)
_TEMPLATE_VARS += ENROLLMENT_PASSWORD _TEMPLATE_VARS += ENROLLMENT_PASSWORD
endif endif
@ -106,14 +105,14 @@ sb_pubkey.der:
curl --fail -L -o sb_pubkey.der $(SECURE_BOOT_KEY_URL) curl --fail -L -o sb_pubkey.der $(SECURE_BOOT_KEY_URL)
# Build boot.iso using Lorax # Build boot.iso using Lorax
results/images/boot.iso: external/lorax/branch-$(VERSION) $(filter lorax_templates/%,$(_LORAX_TEMPLATES)) $(filter repos/%,$(_REPO_FILES)) $(if $(SECURE_BOOT_KEY_URL),sb_pubkey.der) results/images/boot.iso: external/lorax/branch-$(VERSION) $(filter lorax_templates/%,$(_LORAX_TEMPLATES)) $(_REPO_FILES) $(if $(SECURE_BOOT_KEY_URL),sb_pubkey.der)
$(if $(wildcard results), rm -Rf results) $(if $(wildcard results), rm -Rf results)
$(if $(wildcard /etc/rpm/macros.image-language-conf),mv /etc/rpm/macros.image-language-conf $(_TEMP_DIR)/macros.image-language-conf) $(if $(wildcard /etc/rpm/macros.image-language-conf),mv /etc/rpm/macros.image-language-conf $(_TEMP_DIR)/macros.image-language-conf)
lorax -p $(IMAGE_NAME) -v $(VERSION) -r $(VERSION) -t $(VARIANT) \ lorax -p $(IMAGE_NAME) -v $(VERSION) -r $(VERSION) -t $(VARIANT) \
--isfinal --buildarch=$(ARCH) --volid=$(_VOLID) --sharedir $(PWD)/external/lorax/share/templates.d/99-generic \ --isfinal --squashfs-only --buildarch=$(ARCH) --volid=$(_VOLID) --sharedir $(PWD)/external/lorax/share/templates.d/99-generic \
$(_LORAX_ARGS) \ $(_LORAX_ARGS) \
$(foreach file,$(_REPO_FILES),--repo $(patsubst repos/%,$(PWD)/repos/%,$(file))) \ $(foreach file,$(_REPO_FILES),--repo $(PWD)/$(file)) \
$(foreach file,$(_LORAX_TEMPLATES),--add-template $(PWD)/$(file)) \ $(foreach file,$(_LORAX_TEMPLATES),--add-template $(PWD)/$(file)) \
$(foreach file,$(ADDITIONAL_TEMPLATES),--add-template $(file)) \ $(foreach file,$(ADDITIONAL_TEMPLATES),--add-template $(file)) \
$(foreach file,$(_FLATPAK_TEMPLATES),--add-template $(file)) \ $(foreach file,$(_FLATPAK_TEMPLATES),--add-template $(file)) \
@ -132,7 +131,7 @@ clean:
.PHONY: install-deps .PHONY: install-deps
install-deps: install-deps:
$(install_pkg) lorax xorriso coreutils gettext syslinux-nonlinux $(install_pkg) lorax xorriso coreutils gettext
$(foreach DIR,$(filter-out test,$(_SUBDIRS)),$(MAKE) -w -C $(DIR) install-deps;) $(foreach DIR,$(filter-out test,$(_SUBDIRS)),$(MAKE) -w -C $(DIR) install-deps;)

View file

@ -6,9 +6,7 @@ export ARCH := x86_64
export EXTRA_BOOT_PARAMS := export EXTRA_BOOT_PARAMS :=
export IMAGE_NAME := base export IMAGE_NAME := base
export IMAGE_REPO := quay.io/fedora-ostree-desktops export IMAGE_REPO := quay.io/fedora-ostree-desktops
export IMAGE_SRC :=
export IMAGE_TAG = $(VERSION) export IMAGE_TAG = $(VERSION)
export IMAGE_SIGNED := true
REPOS := $(subst :,\:,$(wildcard /etc/yum.repos.d/*.repo)) REPOS := $(subst :,\:,$(wildcard /etc/yum.repos.d/*.repo))
export ROOTFS_SIZE := 4 export ROOTFS_SIZE := 4
export VARIANT := Server export VARIANT := Server

129
README.md
View file

@ -1,14 +1,10 @@
[![Build status](https://github.com/jasonn3/build-container-installer/actions/workflows/tests.yml/badge.svg?event=push)](https://github.com/jasonn3/build-container-installer/actions/workflows/tests.yml) ![Build status](https://github.com/jasonn3/build-container-installer/actions/workflows/tests.yml/badge.svg?event=push) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/35a48e77e64f469ba19d60a1a1e0be71)](https://app.codacy.com/gh/JasonN3/build-container-installer/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/35a48e77e64f469ba19d60a1a1e0be71)](https://app.codacy.com/gh/JasonN3/build-container-installer/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
# Build Container Installer Action # Build Container Installer Action
This action is used to enerate an ISO for installing an OSTree stored in a container image. This utilizes the anaconda command `ostreecontainer`
This action is used to generate an ISO for installing an OSTree stored in a container image. This utilizes the anaconda command `ostreecontainer`, which also supports bootc.
## Usage ## Usage
This action is designed to be called from a GitHub workflow using the following format This action is designed to be called from a GitHub workflow using the following format
```yaml ```yaml
- name: Build ISO - name: Build ISO
uses: jasonn3/build-container-installer@main uses: jasonn3/build-container-installer@main
@ -29,22 +25,121 @@ This action is designed to be called from a GitHub workflow using the following
with: with:
name: ${{ steps.build.outputs.iso_name }} name: ${{ steps.build.outputs.iso_name }}
path: | path: |
${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }} ${{ steps.build.outputs.iso_path }}
${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }}-CHECKSUM ${{ steps.build.outputs.iso_path }}-CHECKSUM
if-no-files-found: error if-no-files-found: error
retention-days: 0 retention-days: 0
compression-level: 0 compression-level: 0
``` ```
**See the [Wiki](https://github.com/JasonN3/build-container-installer/wiki) for development and usage information.** See [Customizing](#customizing) for information about customizing the ISO that gets created using `with`
## Customizing
The following variables can be used to customize the created ISO.
## Star History ### Inputs
| Variable | Description | Default Value | Action | Container/Makefile |
| ----------------------- | ---------------------------------------------------------------------------- | -------------------------------------------- | ------------------ | ------------------ |
| additional_templates | Space delimited list of additional Lorax templates to include | \[empty\] | :white_check_mark: | :white_check_mark: |
| arch | Architecture for image to build | x86_64 | :white_check_mark: | :white_check_mark: |
| enrollment_password | Used for supporting secure boot (requires SECURE_BOOT_KEY_URL to be defined) | container-installer | :white_check_mark: | :white_check_mark: |
| extra_boot_params | Extra params used by grub to boot the anaconda installer | \[empty\] | :white_check_mark: | :white_check_mark: |
| flatpak_remote_name | Name of the Flatpak repo on the destination OS | flathub | :white_check_mark: | :white_check_mark: |
| flatpak_remote_refs | Space separated list of flatpak refs to install | \[empty\] | :white_check_mark: | :white_check_mark: |
| flatpak_remote_refs_dir | Directory that contains files that list the flatpak refs to install | \[empty\] | :white_check_mark: | :white_check_mark: |
| flatpak_remote_url | URL of the flatpakrepo file | https://flathub.org/repo/flathub.flatpakrepo | :white_check_mark: | :white_check_mark: |
| image_name | Name of the source container image | base | :white_check_mark: | :white_check_mark: |
| image_repo | Repository containing the source container image | quay.io/fedora-ostree-desktops | :white_check_mark: | :white_check_mark: |
| image_tag | Tag of the source container image | *VERSION* | :white_check_mark: | :white_check_mark: |
| iso_name | Name of the ISO you wish to output when completed | build/deploy.iso | :white_check_mark: | :white_check_mark: |
| make_target | Overrides the default make target | *ISO Checksum* | :white_check_mark: | :x: |
| repos | List of repo files for Lorax to use | /etc/yum.repos.d/*.repo | :white_check_mark: | :white_check_mark: |
| rootfs_size | The size (in GiB) for the squashfs runtime volume | 2 | :white_check_mark: | :white_check_mark: |
| secure_boot_key_url | Secure boot key that is installed from URL location\*\* | \[empty\] | :white_check_mark: | :white_check_mark: |
| variant | Source container variant\* | Server | :white_check_mark: | :white_check_mark: |
| version | Fedora version of installer to build | 39 | :white_check_mark: | :white_check_mark: |
| web_ui | Enable Anaconda WebUI (experimental) | false | :white_check_mark: | :white_check_mark: |
<a href="https://star-history.com/#jasonn3/build-container-installer&Date"> \*Available options for VARIANT can be found by running `dnf provides system-release`.
<picture> Variant will be the third item in the package name. Example: `fedora-release-kinoite-39-34.noarch` will be kinoite
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=jasonn3/build-container-installer&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=jasonn3/build-container-installer&type=Date" /> \*\* If you need to reference a local file, you can use `file://*path*`
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=jasonn3/build-container-installer&type=Date" />
</picture> ### Outputs
</a> | Variable | Description | Usage |
| -------- | ----------------------------------------| ------------------------------------------------ |
| iso_name | The name of the resulting .iso | ${{ steps.YOUR_ID_FOR_ACTION.outputs.iso_name }} |
| iso_path | The name and path of the resulting .iso | ${{ steps.YOUR_ID_FOR_ACTION.outputs.iso_name }} |
For outputs, see example above.
## Development
### Makefile
The Makefile contains all of the commands that are run in the action. There are separate targets for each file generated, however `make` can be used to generate the final image and `make clean` can be used to clean up the workspace. The resulting ISO will be stored in the `build` directory.
`make install-deps` can be used to install the necessary packages
See [Customizing](#customizing) for information about customizing the ISO that gets created. All variable should be specified CAPITALIZED.
### Container
A container with `make install-deps` already run is provided at `ghcr.io/jasonn3/build-container-installer:latest`
To use the container file, run `docker run --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest`.
This will create an ISO with the baked in defaults of the container image. The resulting file will be called `deploy.iso`
See [Customizing](#customizing) for information about customizing the ISO that gets created. The variable can either be defined as environment variables. All variable should be specified CAPITALIZED.
Examples:
Building an ISO to install Fedora 38
```bash
docker run --rm --privileged --volume .:/github/workspace/build ghcr.io/jasonn3/build-container-installer:latest VERSION=38 IMAGE_NAME=base IMAGE_TAG=38 VARIANT=Server
```
Building an ISO to install Fedora 39
```bash
docker run --rm --privileged --volume .:/github/workspace/build ghcr.io/jasonn3/build-container-installer:latest VERSION=39 IMAGE_NAME=base IMAGE_TAG=39 VARIANT=Server
```
### VSCode Dev Container
There is a dev container configuration provided for development. By default it will use the existing container image available at `ghcr.io/jasonn3/build-container-installer:latest`, however, you can have it build a new image by editing `.devcontainer/devcontainer.json` and replacing `image` with `build`. `Ctrl+/` can be used to comment and uncomment blocks of code within VSCode.
The code from VSCode will be available at `/workspaces/build-container-installer` once the container has started.
Privileged is required for access to loop devices for lorax.
Use existing container image:
```
{
"name": "Existing Dockerfile",
// "build": {
// "context": "..",
// "dockerfile": "../Containerfile",
// "args": {
// "version": "39"
// }
// },
"image": "ghcr.io/jasonn3/build-container-installer:latest",
"overrideCommand": true,
"shutdownAction": "stopContainer",
"privileged": true
}
```
Build a new container image:
```
{
"name": "Existing Dockerfile",
"build": {
"context": "..",
"dockerfile": "../Containerfile",
"args": {
"version": "39"
}
},
//"image": "ghcr.io/jasonn3/build-container-installer:latest",
"overrideCommand": true,
"shutdownAction": "stopContainer",
"privileged": true
}
```

View file

@ -29,26 +29,26 @@ inputs:
required: false required: false
default: "true" default: "true"
enrollment_password: enrollment_password:
description: Used for supporting secure boot (requires SECURE_BOOT_KEY_URL to be defined) description: Used for supporting secure boot (requires secure_boot_key_url to be defined)
required: false required: false
default: "container-installer" default: "container-installer"
extra_boot_params: extra_boot_params:
description: Extra params used by grub to boot the anaconda installer description: Extra params used by grub to boot the anaconda installer
required: false required: false
flatpak_remote_name: flatpak_remote_name:
description: Name of the Flatpak repo on the destination OS description: Name of the Flatpak remote repo
required: false required: false
default: "flathub" default: "flathub"
flatpak_remote_refs: flatpak_remote_refs:
description: Space separated list of flatpak refs to install description: Space delimited list of refs to the flatpak packages to install
required: false required: false
default: "" default: ""
flatpak_remote_refs_dir: flatpak_remote_refs_dir:
description: Directory that contains files that list the flatpak refs to install description: Directory that contains files that list the flatpak refs to install relative to the github workspace
required: false required: false
default: "" default: ""
flatpak_remote_url: flatpak_remote_url:
description: URL of the flatpakrepo file description: The URL of the Flatpak remote flatpakrepo file
required: false required: false
default: https://flathub.org/repo/flathub.flatpakrepo default: https://flathub.org/repo/flathub.flatpakrepo
image_name: image_name:
@ -59,22 +59,15 @@ inputs:
description: Repository containing the source container image description: Repository containing the source container image
required: true required: true
default: quay.io/fedora-ostree-desktops default: quay.io/fedora-ostree-desktops
image_signed:
description: Whether the container image is signed. The policy to test the signing must be configured inside the container image
required: false
default: "true"
image_src:
description: Overrides the source of the container image. Must be formatted for the skopeo copy command
required: false
image_tag: image_tag:
description: Tag of the source container image description: Tag of the source container image. Defaults to the installer version
required: false required: false
iso_name: iso_name:
description: Name of the ISO you wish to output when completed description: "Name of the resulting ISO. Relative paths are relative to github.workspace"
required: false required: false
default: build/deploy.iso default: build/deploy.iso
make_target: make_target:
description: Overrides the default make target description: "Overrides the default make target"
required: false required: false
repos: repos:
description: List of repo files for Lorax to use description: List of repo files for Lorax to use
@ -89,7 +82,7 @@ inputs:
description: Overrides the skopeo cache key description: Overrides the skopeo cache key
required: false required: false
variant: variant:
description: "Source container variant. Available options can be found by running `dnf provides system-release`. Variant will be the third item in the package name. Example: `fedora-release-kinoite-39-34.noarch` will be kinoite" description: "Source container variant. Available options can be found by running `dnf provides system-release`. Variant will be the third item in the package name. Example: `fedora-release-kinoite-39-34.noarch` will be kinonite"
required: true required: true
default: Server default: Server
version: version:
@ -161,7 +154,6 @@ runs:
FLATPAK_REMOTE_URL="${{ inputs.flatpak_remote_url }}" \ FLATPAK_REMOTE_URL="${{ inputs.flatpak_remote_url }}" \
IMAGE_NAME="${{ inputs.image_name }}" \ IMAGE_NAME="${{ inputs.image_name }}" \
IMAGE_REPO="${{ inputs.image_repo }}" \ IMAGE_REPO="${{ inputs.image_repo }}" \
IMAGE_SRC="${{ inputs.image_src }}" \
IMAGE_TAG="${{ inputs.image_tag || inputs.version }}" IMAGE_TAG="${{ inputs.image_tag || inputs.version }}"
- name: Run docker image - name: Run docker image
@ -217,11 +209,8 @@ runs:
FLATPAK_DIR="${{ steps.flatpak_dependencies.outputs.flatpak_dir && format('/github/workspace/{0}', steps.flatpak_dependencies.outputs.flatpak_dir) || '' }}" \ FLATPAK_DIR="${{ steps.flatpak_dependencies.outputs.flatpak_dir && format('/github/workspace/{0}', steps.flatpak_dependencies.outputs.flatpak_dir) || '' }}" \
IMAGE_NAME="${{ inputs.image_name }}" \ IMAGE_NAME="${{ inputs.image_name }}" \
IMAGE_REPO="${{ inputs.image_repo }}" \ IMAGE_REPO="${{ inputs.image_repo }}" \
IMAGE_SIGNED="${{ inputs.image_signed }}" \
IMAGE_SRC="${{ inputs.image_src }}" \
IMAGE_TAG="${{ inputs.image_tag || inputs.version }}" \ IMAGE_TAG="${{ inputs.image_tag || inputs.version }}" \
ISO_NAME=/github/workspace/${{ inputs.iso_name }} \ ISO_NAME=/github/workspace/${{ inputs.iso_name }} \
${{ inputs.repos && format('REPOS="{0}"', inputs.repos) || '' }} \
SECURE_BOOT_KEY_URL="${{ inputs.secure_boot_key_url }}" \ SECURE_BOOT_KEY_URL="${{ inputs.secure_boot_key_url }}" \
VARIANT="${{ inputs.variant }}" \ VARIANT="${{ inputs.variant }}" \
VERSION="${{ inputs.version }}" \ VERSION="${{ inputs.version }}" \

View file

@ -1,5 +1,5 @@
$(IMAGE_NAME)-$(IMAGE_TAG): $(IMAGE_NAME)-$(IMAGE_TAG):
skopeo copy $(if $(IMAGE_SRC),$(IMAGE_SRC),docker://$(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG)) oci:$(IMAGE_NAME)-$(IMAGE_TAG) skopeo copy docker://$(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG) oci:$(IMAGE_NAME)-$(IMAGE_TAG)
install-deps: install-deps:
$(install_pkg) skopeo $(install_pkg) skopeo

View file

@ -1,4 +0,0 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEY4ljyIhI2w9DOptB4WT20S+K5ts3
GJTEKRkXmIYEXGfyKpJMdlGCWeg2kOam5dNhWKXXl46d3eBBo9S53TPpyQ==
-----END PUBLIC KEY-----

View file

@ -1,12 +0,0 @@
SHELL = /bin/bash
docs:
find -name '*.md' -print0 | xargs -0 -I {} bash -c ' \
source_file=$${1:2}; \
final_file=$${source_file//\//_}; \
mv "$${source_file}" "$${final_file}"; \
no_ext_source=$${source_file:0:-3}; \
no_ext_final=$${final_file:0:-3}; \
sed -i "s;(\(../\)*$${source_file});($${no_ext_final});g" $$(find -name '\''*.md'\''); \
' _ {}
find . -type d -empty -delete

View file

@ -1 +0,0 @@
These are the files for the [wiki](https://github.com/JasonN3/build-container-installer/wiki)

View file

@ -1,11 +0,0 @@
- [Home](home.md)
- [Usage](usage.md)
- Development
- [Using the Makefile](development/makefile.md)
- [Using the Container](development/container.md)
- [Using the VSCode Dev Container](development/vscode.md)
- Examples
- [Adding Flatpaks](examples/adding-flatpaks.md)
- [Known Errors](known_errors.md)

View file

@ -1,22 +0,0 @@
# Using the Container
A container with `make install-deps` already run is provided at `ghcr.io/jasonn3/build-container-installer:latest`
To use the container file, run `podman run --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest`.
This will create an ISO with the baked in defaults of the container image. The resulting file will be called `deploy.iso`
See [Inputs](usage#inputs) for information about customizing the ISO that gets created. The variables can be defined as environment variables or command arguments. All variables should be specified in CAPITALIZED form.
Examples:
Building an ISO to install Fedora 39
```bash
podman run --rm --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest VERSION=39 IMAGE_NAME=base IMAGE_TAG=39 VARIANT=Server
```
Building an ISO to install Fedora 40
```bash
podman run --rm --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest VERSION=40 IMAGE_NAME=base IMAGE_TAG=40 VARIANT=Server
```
The same commands are also available using `docker` by replacing `podman` with `docker` in each command.

View file

@ -1,7 +0,0 @@
# Using the Makefile
The Makefile contains all the commands that are run in the action. There are separate targets for each file generated, however `make` can be used to generate the final image and `make clean` can be used to clean up the workspace. The resulting ISO will be stored in the `build` directory.
`make install-deps` can be used to install the necessary packages.
See [Inputs](usage#inputs) for information about the available parameters. All variables should be specified in CAPITALIZED form.

View file

@ -1,46 +0,0 @@
# Using the VSCode Dev Container
There is a dev container configuration provided for development. By default, it will use the existing container image available at `ghcr.io/jasonn3/build-container-installer:latest`. However, you can have it build a new image by editing `.devcontainer/devcontainer.json` and replacing `image` with `build`. `Ctrl+/` can be used to comment and uncomment blocks of code within VSCode.
The code from VSCode will be available at `/workspaces/build-container-installer` once the container has started.
Privileged is required for access to loop devices for lorax.
## Use existing container image
```diff
{
"name": "Existing Image",
- "build": {
- "context": "..",
- "dockerfile": "../Containerfile",
- "args": {
- "version": "39"
- }
- },
+ "image": "ghcr.io/jasonn3/build-container-installer:latest",
"overrideCommand": true,
"shutdownAction": "stopContainer",
"privileged": true
}
```
## Build a new container image
```diff
{
"name": "New Image",
+ "build": {
+ "context": "..",
+ "dockerfile": "../Containerfile",
+ "args": {
+ "version": "39"
+ }
+ },
- "image": "ghcr.io/jasonn3/build-container-installer:latest",
"overrideCommand": true,
"shutdownAction": "stopContainer",
"privileged": true
}
```

View file

@ -1,74 +0,0 @@
# Adding Flatpaks
- [Directly using refs](#directly-using-refs)
- [Using a directory](#using-a-directory)
## Directly using refs
Action:
Specify the following in your workflow:
```yaml
- name: Build ISO
uses: jasonn3/build-container-installer@main
id: build
with:
flatpak_remote_name: flathub
flatpak_remote_url: https://flathub.org/repo/flathub.flatpakrepo
flatpak_remote_refs: app/org.videolan.VLC/x86_64/stable runtime/org.kde.Platform/x86_64/5.15-23.08
```
Podman:
Run the following command:
```bash
podman run --privileged --volume ./:/github/workspace/ ghcr.io/jasonn3/build-container-installer:main \
FLATPAK_REMOTE_NAME=flathub \
FLATPAK_REMOTE_URL=https://flathub.org/repo/flathub.flatpakrepo \
FLATPAK_REMOTE_REFS="app/org.videolan.VLC/x86_64/stable runtime/org.kde.Platform/x86_64/5.15-23.08"
```
---
## Using a directory
Action:
1. Create a directory within your GitHub repo named flatpak_refs
1. Create a file within flatpak_refs with the following content
```plaintext
app/org.videolan.VLC/x86_64/stable
runtime/org.kde.Platform/x86_64/5.15-23.08
```
Specify the following in your workflow:
```yaml
- name: Build ISO
uses: jasonn3/build-container-installer@main
id: build
with:
flatpak_remote_name: flathub
flatpak_remote_url: https://flathub.org/repo/flathub.flatpakrepo
flatpak_remote_refs_dir: /github/workspace/flatpak_refs
```
Podman:
1. Create a directory named flatpak_refs
1. Create a file within flatpak_refs with the following content
```plaintext
app/org.videolan.VLC/x86_64/stable
runtime/org.kde.Platform/x86_64/5.15-23.08
```
Run the following command:
```bash
podman run --privileged --volume ./:/github/workspace/ ghcr.io/jasonn3/build-container-installer:main \
FLATPAK_REMOTE_NAME=flathub \
FLATPAK_REMOTE_URL=https://flathub.org/repo/flathub.flatpakrepo \
FLATPAK_REMOTE_REFS="app/org.videolan.VLC/x86_64/stable runtime/org.kde.Platform/x86_64/5.15-23.08"
```

View file

@ -1,14 +0,0 @@
Welcome to the build-container-installer wiki!
## Index
- [Usage](usage.md)
- Development
- [Using the Makefile](development/makefile.md)
- [Using the Container](development/container.md)
- [Using the VSCode Dev Container](development/vscode.md)
- Examples
- [Adding Flatpaks](examples/adding-flatpaks.md)
- [Known Errors](known_errors.md)

View file

@ -1,7 +0,0 @@
# Known Errors
This page describes known errors and how to resolve them.
## failed to write boot loader configuration
Add `RUN bootupctl backend generate-update-metadata` at the end of your Dockerfile/Containerfile

View file

@ -1,68 +0,0 @@
# Usage
This action is designed to be called from a GitHub workflow using the following format
```yaml
- name: Build ISO
uses: jasonn3/build-container-installer@main
id: build
with:
arch: ${{ env.ARCH}}
image_name: ${{ env.IMAGE_NAME}}
image_repo: ${{ env.IMAGE_REPO}}
image_tag: ${{ env.IMAGE_TAG }}
version: ${{ env.VERSION }}
variant: ${{ env.VARIANT }}
iso_name: ${{ env.IMAGE_NAME }}-${{ env.IMAGE_TAG }}-${{ env.VERSION }}.iso
# This example is for uploading your ISO as a Github artifact. You can do something similar using any cloud storage, so long as you copy the output
- name: Upload ISO as artifact
id: upload
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build.outputs.iso_name }}
path: |
${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }}
${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }}-CHECKSUM
if-no-files-found: error
retention-days: 0
compression-level: 0
```
## Inputs
| Variable | Description | Default Value | Action | Container/Makefile |
| ----------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------- | ------------------ | ------------------ |
| additional_templates | Space delimited list of additional Lorax templates to include | \[empty\] | :white_check_mark: | :white_check_mark: |
| arch | Architecture for image to build | x86_64 | :white_check_mark: | :white_check_mark: |
| enrollment_password | Used for supporting secure boot (requires SECURE_BOOT_KEY_URL to be defined) | container-installer | :white_check_mark: | :white_check_mark: |
| extra_boot_params | Extra params used by grub to boot the anaconda installer | \[empty\] | :white_check_mark: | :white_check_mark: |
| flatpak_remote_name | Name of the Flatpak repo on the destination OS | flathub | :white_check_mark: | :white_check_mark: |
| flatpak_remote_refs | Space separated list of flatpak refs to install | \[empty\] | :white_check_mark: | :white_check_mark: |
| flatpak_remote_refs_dir | Directory that contains files that list the flatpak refs to install | \[empty\] | :white_check_mark: | :white_check_mark: |
| flatpak_remote_url | URL of the flatpakrepo file | <https://flathub.org/repo/flathub.flatpakrepo> | :white_check_mark: | :white_check_mark: |
| image_name | Name of the source container image | base | :white_check_mark: | :white_check_mark: |
| image_repo | Repository containing the source container image | quay.io/fedora-ostree-desktops | :white_check_mark: | :white_check_mark: |
| image_signed | Whether the container image is signed. The policy to test the signing must be configured inside the container image | true | :white_check_mark: | :white_check_mark: |
| image_src | Overrides the source of the container image. Must be formatted for the skopeo copy command | \[empty\] | :white_check_mark: | :white_check_mark: |
| image_tag | Tag of the source container image | *VERSION* | :white_check_mark: | :white_check_mark: |
| iso_name | Name of the ISO you wish to output when completed | build/deploy.iso | :white_check_mark: | :white_check_mark: |
| make_target | Overrides the default make target | *ISO_NAME*-Checksum | :white_check_mark: | :x: |
| repos | List of repo files for Lorax to use | /etc/yum.repos.d/*.repo | :white_check_mark: | :white_check_mark: |
| rootfs_size | The size (in GiB) for the squashfs runtime volume | 2 | :white_check_mark: | :white_check_mark: |
| secure_boot_key_url | Secure boot key that is installed from URL location\*\* | \[empty\] | :white_check_mark: | :white_check_mark: |
| variant | Source container variant\* | Server | :white_check_mark: | :white_check_mark: |
| version | Fedora version of installer to build | 39 | :white_check_mark: | :white_check_mark: |
| web_ui | Enable Anaconda WebUI (experimental) | false | :white_check_mark: | :white_check_mark: |
\*Available options for VARIANT can be found by running `dnf provides system-release`.
Variant will be the third item in the package name. Example: `fedora-release-kinoite-39-34.noarch` will be kinoite
\*\* If you need to reference a local file, you can use `file://*path*`
## Outputs
| Variable | Description | Usage |
| -------- | ----------------------------------------| ------------------------------------------------ |
| iso_name | The name of the resulting .iso | ${{ steps.YOUR_ID_FOR_ACTION.outputs.iso_name }} |
| iso_path | The path to the resulting .iso | ${{ steps.YOUR_ID_FOR_ACTION.outputs.iso_path }} |

2
external/Makefile vendored
View file

@ -1,6 +1,6 @@
lorax/branch-$(VERSION): lorax/branch-$(VERSION):
git config advice.detachedHead false git config advice.detachedHead false
cd lorax && git reset --hard HEAD && git checkout $(if $(_RHEL),rhel$(word 1,$(subst ., ,$(VERSION)))-branch,tags/$(shell cd lorax && git tag -l lorax-$(VERSION).* --sort=creatordate | grep -v 'lorax-40\.5' | tail -n 1)) cd lorax && git reset --hard HEAD && git checkout tags/$(shell cd lorax && git tag -l lorax-$(VERSION).* --sort=creatordate | tail -n 1)
touch lorax/branch-$(VERSION) touch lorax/branch-$(VERSION)
install-deps: install-deps:

View file

@ -14,7 +14,6 @@ repo: script.sh
script.sh: script.sh:
cat << EOF > script.sh cat << EOF > script.sh
which flatpak &> /dev/null || dnf install -y flatpak
mkdir -p /flatpak/flatpak /flatpak/triggers mkdir -p /flatpak/flatpak /flatpak/triggers
mkdir /var/tmp || true mkdir /var/tmp || true
chmod -R 1777 /var/tmp chmod -R 1777 /var/tmp

View file

@ -39,13 +39,9 @@ endef
post_%.tmpl: scripts/post/% post_%.tmpl: scripts/post/%
$(call convert_post_to_tmpl,$*,usr/share/anaconda/post-scripts/$*.ks,true) $(call convert_post_to_tmpl,$*,usr/share/anaconda/post-scripts/$*.ks,true)
install_include_post.tmpl:
echo '<%page />' > install_include_post.tmpl
for file in $(patsubst post_%.tmpl, %, $(filter post_%, $(notdir $(_LORAX_TEMPLATES)))); do echo "append usr/share/anaconda/interactive-defaults.ks \"%include /usr/share/anaconda/post-scripts/$${file}.ks\"" >> install_include_post.tmpl; done
install-deps: install-deps:
FILES=$(wildcard post_*) install_include_post.tmpl FILES=$(wildcard post_*)
clean: clean:
ifneq ($(FILES),) ifneq ($(FILES),)
rm -Rf $(FILES) rm -Rf $(FILES)

View file

@ -1,8 +1,8 @@
<%page args="flatpak_remote_name, _flatpak_repo_url, version"/> <%page args="flatpak_remote_name, _flatpak_repo_url, version"/>
% if int(version) >= 41: % if int(version) >= 41:
append etc/anaconda/conf.d/anaconda.conf "[Payload]"
append etc/anaconda/conf.d/anaconda.conf "flatpak_remote = ${flatpak_remote_name} ${_flatpak_repo_url}" append etc/anaconda/conf.d/anaconda.conf "flatpak_remote = ${flatpak_remote_name} ${_flatpak_repo_url}"
% else: % else:
replace "flatpak_manager\.add_remote\(\".*\", \".*\"\)" "flatpak_manager.add_remote(\"${flatpak_remote_name}\", \"${_flatpak_repo_url}\")" /usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py replace "flatpak_manager\.add_remote\(\".*\", \".*\"\)" "flatpak_manager.add_remote(\"${flatpak_remote_name}\", \"${_flatpak_repo_url}\")" /usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py
replace "flatpak_manager\.replace_installed_refs_remote\(\".*\"\)" "flatpak_manager.replace_installed_refs_remote(\"${flatpak_remote_name}\")" /usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py replace "flatpak_manager\.replace_installed_refs_remote\(\".*\"\)" "flatpak_manager.replace_installed_refs_remote(\"${flatpak_remote_name}\")" /usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py
% endif % endif

View file

@ -1,18 +1,7 @@
<%page args="image_repo, _image_repo_double_escaped, image_name, image_signed, image_tag, _rhel, version"/> <%page args="image_repo, _image_repo_double_escaped, image_name, image_tag, _rhel, version"/>
if (which bootc &> /dev/null) && [ ${_rhel} == 'false' && ${version} -ge 39 ] if (which bootc &> /dev/null) && [ ${_rhel} == 'false' && ${version} -ge 39 ]
then
if [ ${image_signed} == 'true' ]
then then
bootc switch --mutate-in-place --enforce-container-sigpolicy --transport registry ${image_repo}/${image_name}:${image_tag} bootc switch --mutate-in-place --enforce-container-sigpolicy --transport registry ${image_repo}/${image_name}:${image_tag}
else else
bootc switch --mutate-in-place --transport registry ${image_repo}/${image_name}:${image_tag}
fi
else
if [ ${image_signed} == 'true' ]
then
sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/${_image_repo_double_escaped}\/${image_name}:${image_tag}/' /ostree/deploy/default/deploy/*.origin sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/${_image_repo_double_escaped}\/${image_name}:${image_tag}/' /ostree/deploy/default/deploy/*.origin
else
sed -i 's/container-image-reference=.*/container-image-reference=ostree-unverified-image:docker:\/\/${_image_repo_double_escaped}\/${image_name}:${image_tag}/' /ostree/deploy/default/deploy/*.origin
fi
fi fi

View file

@ -1,19 +1,5 @@
#!/bin/bash #!/bin/bash
if [[ ${VERSION} -ge 41 ]]
then
result=0
grep "^\[Payload\]" mnt/install/etc/anaconda/conf.d/anaconda.conf > /dev/null || {
echo "Missing [Payload] header"
result=1
}
grep "^flatpak_remote = ${FLATPAK_REMOTE_NAME} ${_FLATPAK_REPO_URL}" mnt/install/etc/anaconda/conf.d/anaconda.conf > /dev/null || {
echo "Missing flatpak_remote option"
result=1
}
exit ${result}
fi
add_line=$(grep flatpak_manager.add_remote mnt/install/usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py) add_line=$(grep flatpak_manager.add_remote mnt/install/usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py)
add_line_repo=$(echo "${add_line}" | grep "${FLATPAK_REMOTE_NAME}") add_line_repo=$(echo "${add_line}" | grep "${FLATPAK_REMOTE_NAME}")

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
FOUND_VERSION=$(grep VERSION_ID mnt/install/etc/os-release | cut -d= -f2 | tr -d '"') FOUND_VERSION=$(grep VERSION_ID mnt/install/etc/os-release | cut -d= -f2)
if [[ ${FOUND_VERSION} != ${VERSION} ]] if [[ ${FOUND_VERSION} != ${VERSION} ]]
then then

View file

@ -97,20 +97,16 @@ for line in readme_lines:
errors += 1 errors += 1
continue continue
if 'description' in inputs[var_name]: if 'description' in inputs[var_name]:
if parts[2].strip().strip('\*') != inputs[var_name]['description']: if parts[2].strip() != inputs[var_name]['description']:
print("WARNING: " + var_name + " description in README.md does not match action.yml") print("WARNING: " + var_name + " description in README.md does not match action.yml")
if 'default_value' in inputs[var_name]: if 'default_value' in inputs[var_name]:
if not parts[3].strip().strip('"<>').startswith('*'): if not parts[3].strip().strip('"').startswith('*'):
if inputs[var_name]['default_value'] == "": if inputs[var_name]['default_value'] == "":
if parts[3].strip().strip('"') != '\\[empty\\]': if parts[3].strip().strip('"') != '\\[empty\\]':
print("ERROR: " + var_name + " default value in README.md does not match action.yml") print("ERROR: " + var_name + " default value in README.md does not match action.yml")
print("Found " + parts[3].strip().strip('"<>'))
print("Expected " + inputs[var_name]['default_value'])
errors += 1 errors += 1
elif parts[3].strip().strip('"<>') != inputs[var_name]['default_value']: elif parts[3].strip().strip('"') != inputs[var_name]['default_value']:
print("ERROR: " + var_name + " default value in README.md does not match action.yml") print("ERROR: " + var_name + " default value in README.md does not match action.yml")
print("Found " + parts[3].strip().strip('"<>'))
print("Expected " + inputs[var_name]['default_value'])
errors += 1 errors += 1
if 'action' in inputs[var_name] and inputs[var_name]['action']: if 'action' in inputs[var_name] and inputs[var_name]['action']:
if parts[4].strip() != ':white_check_mark:': if parts[4].strip() != ':white_check_mark:':

View file

@ -24,7 +24,7 @@ ansible_inventory:
.PHONY: $(VM_TESTS) install-deps .PHONY: $(VM_TESTS) install-deps
install-deps: install-deps:
$(install_pkg) qemu-system qemu-utils xorriso qemu-system-x86 ncat socat jq ansible curl $(install_pkg) qemu qemu-utils xorriso qemu-system-x86 netcat socat jq ansible curl
files/mnt/iso: files/mnt/iso:
$(if $(wildcard files/mnt),,mkdir files/mnt) $(if $(wildcard files/mnt),,mkdir files/mnt)
@ -32,7 +32,7 @@ files/mnt/iso:
sudo mount -o loop ../../$(ISO_NAME) files/mnt/iso sudo mount -o loop ../../$(ISO_NAME) files/mnt/iso
files/grub.cfg: files/mnt/iso files/grub.cfg: files/mnt/iso
cp files/mnt/iso/$(if $(_RHEL),isolinux/grub.conf,boot/grub2/grub.cfg) files/grub.cfg cp files/mnt/iso/boot/grub2/grub.cfg files/grub.cfg
sed -i 's/quiet/console=ttyS0,115200n8 inst.ks=cdrom:\/ks.cfg/' files/grub.cfg sed -i 's/quiet/console=ttyS0,115200n8 inst.ks=cdrom:\/ks.cfg/' files/grub.cfg
sed -i 's/set default="1"/set default="0"/' files/grub.cfg sed -i 's/set default="1"/set default="0"/' files/grub.cfg
sed -i 's/set timeout=60/set timeout=1/' files/grub.cfg sed -i 's/set timeout=60/set timeout=1/' files/grub.cfg
@ -57,7 +57,7 @@ files/install.iso: files/grub.cfg
-compliance joliet_long_names -compliance joliet_long_names
-map files/ks.cfg ks.cfg -map files/ks.cfg ks.cfg
-chmod 0444 ks.cfg -chmod 0444 ks.cfg
-map files/grub.cfg $(if $(_RHEL),isolinux/grub.conf,boot/grub2/grub.cfg) -map files/grub.cfg boot/grub2/grub.cfg
-end -end
EOF EOF

View file

@ -10,9 +10,7 @@
register: services_state register: services_state
- name: Check that flatpak-add-fedora-repos is disabled - name: Check that flatpak-add-fedora-repos is disabled
when: services_state['ansible_facts']['services']['flatpak-add-fedora-repos.service'] is defined
ansible.builtin.assert: ansible.builtin.assert:
that: that:
- services_state['ansible_facts']['services']['flatpak-add-fedora-repos.service']['status'] == 'disabled' - services_state['ansible_facts']['services']['flatpak-add-fedora-repos.service']['status'] == 'disabled'
fail_msg: 'flatpak-add-fedora-repos.service is not disabled' fail_msg: 'flatpak-add-fedora-repos.service is not disabled'
success_msg: 'flatpak-add-fedora-repos.service is correctly disabled'

View file

@ -1,6 +1,5 @@
input.txt: gen_input.sh input.txt: gen_input.sh
find sed -i 's/quiet/quiet $(EXTRA_BOOT_PARAMS)/g' ../results/boot/grub2/grub.cfg
$(if $(wildcard ../results/boot/grub2/grub.cfg),sed -i 's/quiet/quiet $(EXTRA_BOOT_PARAMS)/g' ../results/boot/grub2/grub.cfg)
sed -i 's/quiet/quiet $(EXTRA_BOOT_PARAMS)/g' ../results/EFI/BOOT/grub.cfg sed -i 's/quiet/quiet $(EXTRA_BOOT_PARAMS)/g' ../results/EFI/BOOT/grub.cfg
$(eval _VARS = ARCH FLATPAK_DIR IMAGE_NAME IMAGE_TAG ISO_NAME VERSION) $(eval _VARS = ARCH FLATPAK_DIR IMAGE_NAME IMAGE_TAG ISO_NAME VERSION)
$(foreach var,$(_VARS),$(var)=$($(var))) bash gen_input.sh | tee input.txt $(foreach var,$(_VARS),$(var)=$($(var))) bash gen_input.sh | tee input.txt

View file

@ -14,11 +14,8 @@ do
then then
continue continue
fi fi
if [[ -f ${PWD}/${file} ]]
then
echo "-map ${PWD}/${file} ${file:2}" echo "-map ${PWD}/${file} ${file:2}"
echo "-chmod 0444 ${file:2}" echo "-chmod 0444 ${file:2}"
fi
done done
popd > /dev/null popd > /dev/null