mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 02:47:56 +01:00
Add build for Fedora-bootc (#105)
This commit is contained in:
parent
ee3a60c6a1
commit
383427c619
17 changed files with 174 additions and 198 deletions
2
.codacy/markdownlint.rb
Normal file
2
.codacy/markdownlint.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
all
|
||||
rule 'MD033', :allowed_elements => ["a","img","picture","source"]
|
||||
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
|
@ -12,6 +12,7 @@ A clear and concise description of what the bug is.
|
|||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
|
|
@ -24,8 +25,9 @@ A clear and concise description of what you expected to happen.
|
|||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Version [e.g. 22]
|
||||
|
||||
- OS: [e.g. iOS]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
|
|
|||
35
.github/workflows/build_iso.yml
vendored
35
.github/workflows/build_iso.yml
vendored
|
|
@ -9,15 +9,6 @@ on:
|
|||
parent_job_name:
|
||||
required: true
|
||||
type: string
|
||||
flatpaks_refs:
|
||||
required: false
|
||||
type: string
|
||||
flatpaks_refs_dir:
|
||||
required: false
|
||||
type: string
|
||||
suffix:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
load_vars:
|
||||
|
|
@ -38,8 +29,7 @@ jobs:
|
|||
continue-on-error: false
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: ${{ fromJson(needs.load_vars.outputs.BUILD_VERSIONS) }}
|
||||
matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
|
@ -63,7 +53,7 @@ jobs:
|
|||
id: jobs
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }})"
|
||||
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
||||
per_page: 100
|
||||
|
||||
- name: Set status
|
||||
|
|
@ -72,7 +62,7 @@ jobs:
|
|||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
status: pending
|
||||
context: ${{ env.JOB_NAME }} (${{ matrix.version }})
|
||||
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
||||
sha: ${{ env.sha }}
|
||||
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||
|
||||
|
|
@ -115,25 +105,26 @@ jobs:
|
|||
id: build
|
||||
with:
|
||||
arch: ${{ needs.load_vars.outputs.ARCH }}
|
||||
image_name: ${{ needs.load_vars.outputs.IMAGE_NAME }}
|
||||
image_repo: ${{ needs.load_vars.outputs.IMAGE_REPO }}
|
||||
image_name: ${{ matrix.image_name }}
|
||||
image_repo: ${{ matrix.image_repo}}
|
||||
image_tag: ${{ matrix.version }}
|
||||
version: ${{ matrix.version }}
|
||||
repos: ${{ matrix.repos }}
|
||||
variant: ${{ needs.load_vars.outputs.VARIANT }}
|
||||
flatpak_remote_refs: ${{ inputs.flatpaks_refs }}
|
||||
flatpak_remote_refs_dir: ${{ inputs.flatpaks_refs_dir }}
|
||||
flatpak_remote_refs: ${{ matrix.flatpaks == 'flatpak_refs' && needs.load_vars.outputs.FLATPAK_REMOTE_REFS || '' }}
|
||||
flatpak_remote_refs_dir: ${{ matrix.flatpaks == 'flatpak_refs_dir' && needs.load_vars.outputs.FLATPAK_REMOTE_REFS_DIR || '' }}
|
||||
secure_boot_key_url: ${{ needs.load_vars.outputs.SECURE_BOOT_KEY_URL }}
|
||||
enrollment_password: ${{ needs.load_vars.outputs.ENROLLMENT_PASSWORD }}
|
||||
iso_name: build/${{ needs.load_vars.outputs.IMAGE_NAME }}-${{ matrix.version }}${{ inputs.suffix && format('-{0}', inputs.suffix || '') }}.iso
|
||||
iso_name: build/${{ matrix.image_name }}-${{ matrix.version }}${{ matrix.flatpaks == 'false' && '' || format('-{0}', matrix.flatpaks) }}.iso
|
||||
|
||||
- name: Upload ISO as artifact
|
||||
id: upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ needs.load_vars.outputs.IMAGE_NAME }}-${{ matrix.version }}${{ inputs.suffix && format('-{0}', inputs.suffix || '') }}
|
||||
name: ${{ matrix.image_name }}-${{ matrix.version }}${{ matrix.flatpaks == 'false' && '' || format('-{0}', matrix.flatpaks) }}
|
||||
path: |
|
||||
build/${{ needs.load_vars.outputs.IMAGE_NAME }}-${{ matrix.version }}${{ inputs.suffix && format('-{0}', inputs.suffix || '') }}.iso
|
||||
build/${{ needs.load_vars.outputs.IMAGE_NAME }}-${{ matrix.version }}${{ inputs.suffix && format('-{0}', inputs.suffix || '') }}.iso-CHECKSUM
|
||||
build/${{ matrix.image_name }}-${{ matrix.version }}${{ matrix.flatpaks == 'false' && '' || format('-{0}', matrix.flatpaks) }}.iso
|
||||
build/${{ matrix.image_name }}-${{ matrix.version }}${{ matrix.flatpaks == 'false' && '' || format('-{0}', matrix.flatpaks) }}.iso-CHECKSUM
|
||||
if-no-files-found: error
|
||||
retention-days: 0
|
||||
compression-level: 0
|
||||
|
|
@ -145,7 +136,7 @@ jobs:
|
|||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
status: ${{ job.status }}
|
||||
context: ${{ env.JOB_NAME }} (${{ matrix.version }})
|
||||
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
||||
sha: ${{ env.sha }}
|
||||
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||
|
||||
|
|
|
|||
51
.github/workflows/build_vars.yml
vendored
51
.github/workflows/build_vars.yml
vendored
|
|
@ -5,18 +5,53 @@ on:
|
|||
outputs:
|
||||
ARCH:
|
||||
value: 'x86_64'
|
||||
BUILD_VERSIONS:
|
||||
value: '[38, 39, 40]'
|
||||
IMAGE_NAME:
|
||||
value: 'base'
|
||||
IMAGE_REPO:
|
||||
value: 'quay.io/fedora-ostree-desktops'
|
||||
IMAGE_TAG:
|
||||
value: '39'
|
||||
BUILD_MATRIX:
|
||||
value: '
|
||||
{
|
||||
"version": [
|
||||
"38",
|
||||
"39",
|
||||
"40",
|
||||
],
|
||||
"flatpaks": [
|
||||
"false",
|
||||
"flatpak_dir",
|
||||
"flatpak_refs"
|
||||
],
|
||||
"exclude": [
|
||||
{
|
||||
"version": "40",
|
||||
"flatpaks": "flatpak_dir"
|
||||
},
|
||||
{
|
||||
"version": "40",
|
||||
"flatpaks": "flatpak_refs"
|
||||
}
|
||||
],
|
||||
"include": [
|
||||
{
|
||||
"version": "38",
|
||||
"image_repo": "quay.io/fedora-ostree-desktops",
|
||||
"image_name": "base"
|
||||
},
|
||||
{
|
||||
"version": "39",
|
||||
"image_repo": "quay.io/fedora-ostree-desktops",
|
||||
"image_name": "base"
|
||||
},
|
||||
{
|
||||
"version": "40",
|
||||
"image_repo": "quay.io/fedora",
|
||||
"image_name": "fedora-bootc"
|
||||
}
|
||||
]
|
||||
}'
|
||||
VARIANT:
|
||||
value: 'Server'
|
||||
FLATPAK_REMOTE_REFS_DIR:
|
||||
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:
|
||||
value: 'https://github.com/ublue-os/akmods/raw/main/certs/public_key.der'
|
||||
ENROLLMENT_PASSWORD:
|
||||
|
|
|
|||
43
.github/workflows/test_deployment.yml
vendored
43
.github/workflows/test_deployment.yml
vendored
|
|
@ -9,15 +9,6 @@ on:
|
|||
parent_job_name:
|
||||
required: true
|
||||
type: string
|
||||
flatpaks_refs:
|
||||
required: false
|
||||
type: string
|
||||
flatpaks_refs_dir:
|
||||
required: false
|
||||
type: string
|
||||
suffix:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
load_vars:
|
||||
|
|
@ -37,8 +28,7 @@ jobs:
|
|||
continue-on-error: false
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: ${{ fromJson(needs.load_vars.outputs.BUILD_VERSIONS) }}
|
||||
matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
|
@ -62,7 +52,7 @@ jobs:
|
|||
id: jobs
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }})"
|
||||
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
||||
per_page: 100
|
||||
|
||||
- name: Set status
|
||||
|
|
@ -71,7 +61,7 @@ jobs:
|
|||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
status: pending
|
||||
context: ${{ env.JOB_NAME }} (${{ matrix.version }})
|
||||
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
||||
sha: ${{ env.sha }}
|
||||
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||
|
||||
|
|
@ -84,7 +74,7 @@ jobs:
|
|||
- name: Download generated ISO
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ format('{0}-{1}', needs.load_vars.outputs.IMAGE_NAME, matrix.version) }}${{ inputs.suffix && format('-{0}', inputs.suffix || '') }}
|
||||
name: ${{ matrix.image_name }}-${{ matrix.version }}${{ matrix.flatpaks == 'false' && '' || format('-{0}', matrix.flatpaks) }}
|
||||
|
||||
- name: Run VM Tests
|
||||
env:
|
||||
|
|
@ -93,18 +83,23 @@ jobs:
|
|||
VM_IP: "127.0.0.1"
|
||||
VM_PORT: "5555"
|
||||
run: |
|
||||
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} \
|
||||
make test/vm \
|
||||
ARCH=${{ needs.load_vars.outputs.ARCH}} \
|
||||
IMAGE_NAME=${{ needs.load_vars.outputs.IMAGE_NAME}} \
|
||||
IMAGE_REPO=${{ needs.load_vars.outputs.IMAGE_REPO}} \
|
||||
ENROLLMENT_PASSWORD=${{ needs.load_vars.outputs.ENROLLMENT_PASSWORD }} \
|
||||
${{ matrix.flatpaks == 'flatpak_refs' && format('FLATPAK_REMOTE_REFS="{0}"', needs.load_vars.outputs.FLATPAK_REMOTE_REFS) || '' }} \
|
||||
${{ 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 }} \
|
||||
VERSION=${{ matrix.version }} \
|
||||
VARIANT=${{ needs.load_vars.outputs.VARIANT }} \
|
||||
${{ 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) || '' }} \
|
||||
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 }} \
|
||||
ENROLLMENT_PASSWORD=${{ needs.load_vars.outputs.ENROLLMENT_PASSWORD }}
|
||||
VARIANT=${{ needs.load_vars.outputs.VARIANT }} \
|
||||
VERSION=${{ matrix.version }} \
|
||||
VM_IP=${VM_IP} \
|
||||
VM_PASS=${VM_PASS} \
|
||||
VM_PORT=${VM_PORT} \
|
||||
VM_USER=${VM_USER}
|
||||
|
||||
- name: Set status
|
||||
if: inputs.pr && always()
|
||||
|
|
@ -112,6 +107,6 @@ jobs:
|
|||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
status: ${{ job.status }}
|
||||
context: ${{ env.JOB_NAME }} (${{ matrix.version }})
|
||||
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
||||
sha: ${{ env.sha }}
|
||||
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||
|
|
|
|||
39
.github/workflows/test_iso.yml
vendored
39
.github/workflows/test_iso.yml
vendored
|
|
@ -9,15 +9,6 @@ on:
|
|||
parent_job_name:
|
||||
required: true
|
||||
type: string
|
||||
flatpaks_refs:
|
||||
required: false
|
||||
type: string
|
||||
flatpaks_refs_dir:
|
||||
required: false
|
||||
type: string
|
||||
suffix:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
load_vars:
|
||||
|
|
@ -37,8 +28,7 @@ jobs:
|
|||
continue-on-error: false
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: ${{ fromJson(needs.load_vars.outputs.BUILD_VERSIONS) }}
|
||||
matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
|
@ -62,7 +52,7 @@ jobs:
|
|||
id: jobs
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }})"
|
||||
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
||||
per_page: 100
|
||||
|
||||
- name: Set status
|
||||
|
|
@ -71,7 +61,7 @@ jobs:
|
|||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
status: pending
|
||||
context: ${{ env.JOB_NAME }} (${{ matrix.version }})
|
||||
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
||||
sha: ${{ env.sha }}
|
||||
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||
|
||||
|
|
@ -84,22 +74,23 @@ jobs:
|
|||
- name: Download generated ISO
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ format('{0}-{1}', needs.load_vars.outputs.IMAGE_NAME, matrix.version) }}${{ inputs.suffix && format('-{0}', inputs.suffix || '') }}
|
||||
name: ${{ matrix.image_name }}-${{ matrix.version }}${{ matrix.flatpaks == 'false' && '' || format('-{0}', matrix.flatpaks) }}
|
||||
|
||||
- name: Run ISO checks
|
||||
run: |
|
||||
make test/iso \
|
||||
ARCH=${{ needs.load_vars.outputs.ARCH}} \
|
||||
IMAGE_NAME=${{ needs.load_vars.outputs.IMAGE_NAME}} \
|
||||
IMAGE_REPO=${{ needs.load_vars.outputs.IMAGE_REPO}} \
|
||||
IMAGE_TAG=${{ matrix.version }} \
|
||||
VERSION=${{ matrix.version }} \
|
||||
VARIANT=${{ needs.load_vars.outputs.VARIANT }} \
|
||||
${{ 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
|
||||
${{ matrix.flatpaks == 'flatpak_refs' && format('FLATPAK_REMOTE_REFS="{0}"', needs.load_vars.outputs.FLATPAK_REMOTE_REFS) || '' }} \
|
||||
${{ 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 }} \
|
||||
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 }}
|
||||
|
||||
- name: Set status
|
||||
if: inputs.pr && always()
|
||||
|
|
@ -107,6 +98,6 @@ jobs:
|
|||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
status: ${{ job.status }}
|
||||
context: ${{ env.JOB_NAME }} (${{ matrix.version }})
|
||||
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
||||
sha: ${{ env.sha }}
|
||||
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||
88
.github/workflows/tests.yml
vendored
88
.github/workflows/tests.yml
vendored
|
|
@ -31,95 +31,29 @@ jobs:
|
|||
pr: ${{ inputs.pr }}
|
||||
parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Build Container
|
||||
|
||||
build_iso_flatpaks:
|
||||
name: Build ISO with Flatpaks
|
||||
build_isos:
|
||||
name: Build ISOs
|
||||
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 Flatpaks
|
||||
flatpaks_refs_dir: flatpak_refs
|
||||
suffix: flatpaks
|
||||
parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Build ISOs
|
||||
|
||||
test_iso_flatpaks:
|
||||
name: Test ISO with Flatpaks
|
||||
test_isos:
|
||||
name: Test ISOs
|
||||
needs:
|
||||
- build_iso_flatpaks
|
||||
- build_isos
|
||||
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 Flatpaks
|
||||
flatpaks_refs_dir: flatpak_refs
|
||||
suffix: flatpaks
|
||||
parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Test ISOs
|
||||
|
||||
test_deployment_flatpaks:
|
||||
name: Test Deployment with Flatpaks
|
||||
test_deployments:
|
||||
name: Test Deployments
|
||||
needs:
|
||||
- build_iso_flatpaks
|
||||
- build_isos
|
||||
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 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
|
||||
parent_job_name: ${{ inputs.parent_job_name && format('{0} / ', inputs.parent_job_name) }}Test Deployments
|
||||
|
|
|
|||
1
.mdlrc
Normal file
1
.mdlrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
style "#{File.dirname(__FILE__)}/.codacy/markdownlint.rb"
|
||||
13
Makefile
13
Makefile
|
|
@ -34,17 +34,18 @@ _TEMPLATE_VARS := ARCH IMAGE_NAME IMAGE_REPO _IMAGE_REPO_DOUBLE_ESCA
|
|||
_VOLID := $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$(IMAGE_TAG)
|
||||
|
||||
ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo)
|
||||
_RHEL := true
|
||||
export _RHEL := true
|
||||
_LORAX_TEMPLATES += $(call get_templates,rhel)
|
||||
else
|
||||
_RHEL := false
|
||||
undefine _RHEL
|
||||
endif
|
||||
|
||||
ifeq ($(_RHEL),true)
|
||||
_LORAX_ARGS += --nomacboot --noupgrade
|
||||
else ifeq ($(VARIANT),Server)
|
||||
_LORAX_ARGS += --macboot --noupgrade
|
||||
_LORAX_ARGS += --macboot --noupgrade --squashfs-only
|
||||
else
|
||||
_LORAX_ARGS += --nomacboot
|
||||
_LORAX_ARGS += --nomacboot --squashfs-only
|
||||
endif
|
||||
|
||||
ifeq ($(WEB_UI),true)
|
||||
|
|
@ -110,7 +111,7 @@ results/images/boot.iso: external/lorax/branch-$(VERSION) $(filter lorax_templat
|
|||
$(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) \
|
||||
--isfinal --squashfs-only --buildarch=$(ARCH) --volid=$(_VOLID) --sharedir $(PWD)/external/lorax/share/templates.d/99-generic \
|
||||
--isfinal --buildarch=$(ARCH) --volid=$(_VOLID) --sharedir $(PWD)/external/lorax/share/templates.d/99-generic \
|
||||
$(_LORAX_ARGS) \
|
||||
$(foreach file,$(_REPO_FILES),--repo $(PWD)/$(file)) \
|
||||
$(foreach file,$(_LORAX_TEMPLATES),--add-template $(PWD)/$(file)) \
|
||||
|
|
@ -131,7 +132,7 @@ clean:
|
|||
|
||||
.PHONY: install-deps
|
||||
install-deps:
|
||||
$(install_pkg) lorax xorriso coreutils gettext
|
||||
$(install_pkg) lorax xorriso coreutils gettext syslinux-nonlinux
|
||||
$(foreach DIR,$(filter-out test,$(_SUBDIRS)),$(MAKE) -w -C $(DIR) install-deps;)
|
||||
|
||||
|
||||
|
|
|
|||
71
README.md
71
README.md
|
|
@ -2,9 +2,11 @@
|
|||
[](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
|
||||
|
||||
This action is used to generate an ISO for installing an OSTree stored in a container image. This utilizes the anaconda command `ostreecontainer`
|
||||
|
||||
## Usage
|
||||
|
||||
This action is designed to be called from a GitHub workflow using the following format
|
||||
```yaml
|
||||
- name: Build ISO
|
||||
|
|
@ -36,9 +38,11 @@ This action is designed to be called from a GitHub workflow using the following
|
|||
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.
|
||||
|
||||
### 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: |
|
||||
|
|
@ -48,12 +52,12 @@ The following variables can be used to customize the created ISO.
|
|||
| 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: |
|
||||
| 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: |
|
||||
| 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: |
|
||||
|
|
@ -67,6 +71,7 @@ Variant will be the third item in the package name. Example: `fedora-release-kin
|
|||
\*\* 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 }} |
|
||||
|
|
@ -75,7 +80,9 @@ Variant will be the third item in the package name. Example: `fedora-release-kin
|
|||
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
|
||||
|
|
@ -83,6 +90,7 @@ The Makefile contains all of the commands that are run in the action. There are
|
|||
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`.
|
||||
|
|
@ -103,6 +111,7 @@ docker run --rm --privileged --volume .:/build-container-installer/build ghcr.i
|
|||
```
|
||||
|
||||
### 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.
|
||||
|
|
@ -112,35 +121,45 @@ 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
|
||||
"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
|
||||
"name": "Existing Dockerfile",
|
||||
"build": {
|
||||
"context": "..",
|
||||
"dockerfile": "../Containerfile",
|
||||
"args": {
|
||||
"version": "39"
|
||||
}
|
||||
},
|
||||
//"image": "ghcr.io/jasonn3/build-container-installer:latest",
|
||||
"overrideCommand": true,
|
||||
"shutdownAction": "stopContainer",
|
||||
"privileged": true
|
||||
}
|
||||
```
|
||||
|
||||
## Star History
|
||||
|
||||
<a href="https://star-history.com/#jasonn3/build-container-installer&Date">
|
||||
<picture>
|
||||
<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" />
|
||||
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=jasonn3/build-container-installer&type=Date" />
|
||||
</picture>
|
||||
</a>
|
||||
|
|
@ -211,6 +211,7 @@ runs:
|
|||
IMAGE_REPO="${{ inputs.image_repo }}" \
|
||||
IMAGE_TAG="${{ inputs.image_tag || inputs.version }}" \
|
||||
ISO_NAME=/github/workspace/${{ inputs.iso_name }} \
|
||||
${{ inputs.repos && format('REPOS="{0}"', inputs.repos) || '' }} \
|
||||
SECURE_BOOT_KEY_URL="${{ inputs.secure_boot_key_url }}" \
|
||||
VARIANT="${{ inputs.variant }}" \
|
||||
VERSION="${{ inputs.version }}" \
|
||||
|
|
|
|||
2
external/Makefile
vendored
2
external/Makefile
vendored
|
|
@ -1,6 +1,6 @@
|
|||
lorax/branch-$(VERSION):
|
||||
git config advice.detachedHead false
|
||||
cd lorax && git reset --hard HEAD && git checkout tags/$(shell cd lorax && git tag -l lorax-$(VERSION).* --sort=creatordate | tail -n 1)
|
||||
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 | tail -n 1))
|
||||
touch lorax/branch-$(VERSION)
|
||||
|
||||
install-deps:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
FOUND_VERSION=$(grep VERSION_ID mnt/install/etc/os-release | cut -d= -f2)
|
||||
FOUND_VERSION=$(grep VERSION_ID mnt/install/etc/os-release | cut -d= -f2 | tr -d '"')
|
||||
|
||||
if [[ ${FOUND_VERSION} != ${VERSION} ]]
|
||||
then
|
||||
|
|
|
|||
|
|
@ -100,12 +100,12 @@ for line in readme_lines:
|
|||
if parts[2].strip() != inputs[var_name]['description']:
|
||||
print("WARNING: " + var_name + " description in README.md does not match action.yml")
|
||||
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 parts[3].strip().strip('"') != '\\[empty\\]':
|
||||
print("ERROR: " + var_name + " default value in README.md does not match action.yml")
|
||||
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")
|
||||
errors += 1
|
||||
if 'action' in inputs[var_name] and inputs[var_name]['action']:
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ files/mnt/iso:
|
|||
sudo mount -o loop ../../$(ISO_NAME) files/mnt/iso
|
||||
|
||||
files/grub.cfg: files/mnt/iso
|
||||
cp files/mnt/iso/boot/grub2/grub.cfg files/grub.cfg
|
||||
cp files/mnt/iso/$(if $(_RHEL),isolinux/grub.conf,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/set default="1"/set default="0"/' 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
|
||||
-map files/ks.cfg ks.cfg
|
||||
-chmod 0444 ks.cfg
|
||||
-map files/grub.cfg boot/grub2/grub.cfg
|
||||
-map files/grub.cfg $(if $(_RHEL),isolinux/grub.conf,boot/grub2/grub.cfg)
|
||||
-end
|
||||
EOF
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
input.txt: gen_input.sh
|
||||
sed -i 's/quiet/quiet $(EXTRA_BOOT_PARAMS)/g' ../results/boot/grub2/grub.cfg
|
||||
find
|
||||
$(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
|
||||
$(eval _VARS = ARCH FLATPAK_DIR IMAGE_NAME IMAGE_TAG ISO_NAME VERSION)
|
||||
$(foreach var,$(_VARS),$(var)=$($(var))) bash gen_input.sh | tee input.txt
|
||||
|
|
|
|||
|
|
@ -14,8 +14,11 @@ do
|
|||
then
|
||||
continue
|
||||
fi
|
||||
echo "-map ${PWD}/${file} ${file:2}"
|
||||
echo "-chmod 0444 ${file:2}"
|
||||
if [[ -f ${PWD}/${file} ]]
|
||||
then
|
||||
echo "-map ${PWD}/${file} ${file:2}"
|
||||
echo "-chmod 0444 ${file:2}"
|
||||
fi
|
||||
done
|
||||
popd > /dev/null
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue