diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index 53f412d..57949bc 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -26,7 +26,7 @@ jobs: statuses: write steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 @@ -97,7 +97,7 @@ jobs: labels: ${{ steps.meta.outputs.labels || steps.meta_pr.outputs.labels }} - name: Login to GitHub Container Registry - uses: docker/login-action@v3.6.0 + uses: docker/login-action@v3.3.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -123,7 +123,7 @@ jobs: - name: Install Cosign if: startsWith(github.ref, 'refs/tags/v') - uses: sigstore/cosign-installer@v3.10.0 + uses: sigstore/cosign-installer@v3.7.0 - name: Sign the images if: startsWith(github.ref, 'refs/tags/v') diff --git a/.github/workflows/build_iso.yml b/.github/workflows/build_iso.yml index 6cd33ef..4c89f38 100644 --- a/.github/workflows/build_iso.yml +++ b/.github/workflows/build_iso.yml @@ -32,7 +32,7 @@ jobs: matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }} steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v4 with: submodules: recursive @@ -53,7 +53,7 @@ jobs: id: jobs with: 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 }}, ${{ matrix.flatpaks }})" per_page: 100 - name: Set status @@ -62,7 +62,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} status: pending - context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" + context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})" sha: ${{ env.sha }} targetUrl: ${{ steps.jobs.outputs.html_url }} @@ -138,7 +138,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} status: ${{ job.status }} - context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" + context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})" sha: ${{ env.sha }} targetUrl: ${{ steps.jobs.outputs.html_url }} diff --git a/.github/workflows/build_vars.yml b/.github/workflows/build_vars.yml index 8a60657..ffbe614 100644 --- a/.github/workflows/build_vars.yml +++ b/.github/workflows/build_vars.yml @@ -9,9 +9,9 @@ on: value: ' { "version": [ - "41", - "42", - "43" + "39", + "40", + "41" ], "flatpaks": [ "false", @@ -19,45 +19,10 @@ on: "flatpak_refs" ], "image_repo": [ - "ghcr.io/ublue-os", - "quay.io/fedora", - "quay.io/fedora-ostree-desktops" + "ghcr.io/ublue-os" ], - "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" - } + "image_name": [ + "base-main" ] }' VARIANT: diff --git a/.github/workflows/clean_repo.yml b/.github/workflows/clean_repo.yml index a19ddd5..b1e1368 100644 --- a/.github/workflows/clean_repo.yml +++ b/.github/workflows/clean_repo.yml @@ -1,7 +1,7 @@ name: Clean Container Registry on: -# schedule: -# - cron: '0 21 * * 0' + schedule: + - cron: '0 21 * * 0' workflow_dispatch: @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Delete Untagged Packages - uses: Chizkiyahu/delete-untagged-ghcr-action@v5 + uses: Chizkiyahu/delete-untagged-ghcr-action@v4 with: token: ${{ secrets.PACKAGE_DELETER }} repository_owner: ${{ github.repository_owner }} diff --git a/.github/workflows/test_deployment.yml b/.github/workflows/test_deployment.yml index 8738ded..792b68a 100644 --- a/.github/workflows/test_deployment.yml +++ b/.github/workflows/test_deployment.yml @@ -31,7 +31,7 @@ jobs: matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }} steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v4 with: submodules: recursive @@ -52,7 +52,7 @@ jobs: id: jobs with: 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 }}, ${{ matrix.flatpaks }})" per_page: 100 - name: Set status @@ -61,7 +61,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} status: pending - context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" + context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})" sha: ${{ env.sha }} targetUrl: ${{ steps.jobs.outputs.html_url }} @@ -107,6 +107,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} status: ${{ job.status }} - context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" + context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})" sha: ${{ env.sha }} targetUrl: ${{ steps.jobs.outputs.html_url }} diff --git a/.github/workflows/test_iso.yml b/.github/workflows/test_iso.yml index 049fc11..3b072d7 100644 --- a/.github/workflows/test_iso.yml +++ b/.github/workflows/test_iso.yml @@ -31,7 +31,7 @@ jobs: matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }} steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v4 with: submodules: recursive @@ -52,7 +52,7 @@ jobs: id: jobs with: 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 }}, ${{ matrix.flatpaks }})" per_page: 100 - name: Set status @@ -61,7 +61,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} status: pending - context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" + context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})" sha: ${{ env.sha }} targetUrl: ${{ steps.jobs.outputs.html_url }} @@ -98,6 +98,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} status: ${{ job.status }} - context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})" + context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})" sha: ${{ env.sha }} - targetUrl: ${{ steps.jobs.outputs.html_url }} + targetUrl: ${{ steps.jobs.outputs.html_url }} \ No newline at end of file diff --git a/.github/workflows/test_repo.yml b/.github/workflows/test_repo.yml index 59071c0..4c658e3 100644 --- a/.github/workflows/test_repo.yml +++ b/.github/workflows/test_repo.yml @@ -20,7 +20,7 @@ jobs: contents: read steps: - name: Checkout repo - uses: actions/checkout@v5 + uses: actions/checkout@v4 - name: Run test run: | diff --git a/.github/workflows/update_wiki.yml b/.github/workflows/update_wiki.yml index fce015c..a9bdf15 100644 --- a/.github/workflows/update_wiki.yml +++ b/.github/workflows/update_wiki.yml @@ -18,10 +18,10 @@ jobs: run: | sudo apt install -y make rsync # Checkout Main Repo - - uses: actions/checkout@v5 + - uses: actions/checkout@v4 # Checkout Wiki Repo - - uses: actions/checkout@v5 + - uses: actions/checkout@v4 with: repository: ${{github.repository}}.wiki persist-credentials: true diff --git a/Containerfile b/Containerfile index 18b844b..a0678e4 100644 --- a/Containerfile +++ b/Containerfile @@ -1,6 +1,6 @@ -FROM fedora:42 +FROM fedora:40 -ARG VERSION=42 +ARG VERSION=39 ENV ARCH="x86_64" ENV IMAGE_NAME="base" diff --git a/Makefile b/Makefile index 9f85c58..20bc28d 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ export install_pkg _IMAGE_REPO_ESCAPED := $(subst /,\/,$(IMAGE_REPO)) _IMAGE_REPO_DOUBLE_ESCAPED := $(subst \,\\\,$(_IMAGE_REPO_ESCAPED)) _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)) _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 @@ -35,7 +35,7 @@ _VOLID := $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$( ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo) export _RHEL := true -export _LORAX_TEMPLATES += $(call get_templates,rhel) +_LORAX_TEMPLATES += $(call get_templates,rhel) else undefine _RHEL endif @@ -53,17 +53,17 @@ _LORAX_ARGS += -i anaconda-webui endif ifneq ($(DNF_CACHE),) - _LORAX_ARGS += --cachedir $(DNF_CACHE) -export _LORAX_TEMPLATES += $(call get_templates,cache) - _TEMPLATE_VARS += DNF_CACHE +_LORAX_ARGS += --cachedir $(DNF_CACHE) +_LORAX_TEMPLATES += $(call get_templates,cache) +_TEMPLATE_VARS += DNF_CACHE endif 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) - _LORAX_ARGS += -i flatpak-libs -export _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 +_LORAX_ARGS += -i flatpak-libs +_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 else ifneq ($(FLATPAK_REMOTE_REFS_DIR),) COLLECTED_REFS := $(foreach file,$(filter-out README.md Makefile,$(wildcard $(FLATPAK_REMOTE_REFS_DIR)/*)),$(shell cat $(file))) @@ -71,19 +71,19 @@ export FLATPAK_REMOTE_REFS += $(sort $(COLLECTED_REFS)) endif 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) - _LORAX_ARGS += -i flatpak-libs -export _LORAX_TEMPLATES += $(call get_templates,flatpak) \ - 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 +_LORAX_ARGS += -i flatpak-libs +_LORAX_TEMPLATES += $(call get_templates,flatpak) \ + 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 endif endif ifneq ($(SECURE_BOOT_KEY_URL),) -export _LORAX_TEMPLATES += $(call get_templates,secureboot) - _TEMPLATE_VARS += ENROLLMENT_PASSWORD +_LORAX_TEMPLATES += $(call get_templates,secureboot) +_TEMPLATE_VARS += ENROLLMENT_PASSWORD endif _SUBDIRS := container external flatpak_refs lorax_templates repos xorriso test diff --git a/README.md b/README.md index fdea723..26a3de9 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,8 @@ This action is designed to be called from a GitHub workflow using the following 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 + ${{ steps.build.outputs.iso_path }} + ${{ steps.build.outputs.iso_path }}-CHECKSUM if-no-files-found: error retention-days: 0 compression-level: 0 diff --git a/action.yml b/action.yml index 3615f05..7115248 100644 --- a/action.yml +++ b/action.yml @@ -89,7 +89,7 @@ inputs: description: Overrides the skopeo cache key required: false 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 default: Server version: diff --git a/docs/_Sidebar.md b/docs/_Sidebar.md index 7e637e7..300a54e 100644 --- a/docs/_Sidebar.md +++ b/docs/_Sidebar.md @@ -1,5 +1,4 @@ - [Home](home.md) -- [Usage](usage.md) - Development - [Using the Makefile](development/makefile.md) - [Using the Container](development/container.md) @@ -8,4 +7,4 @@ - Examples - [Adding Flatpaks](examples/adding-flatpaks.md) -- [Known Errors](known_errors.md) +- [Known Errors](known_errors.md) \ No newline at end of file diff --git a/docs/development/container.md b/docs/development/container.md index 0e0a0ef..29d4a7a 100644 --- a/docs/development/container.md +++ b/docs/development/container.md @@ -6,7 +6,7 @@ To use the container file, run `podman run --privileged --volume .:/build-contai 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. +See [Inputs](../usage.md#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 diff --git a/docs/development/makefile.md b/docs/development/makefile.md index be37851..a94535e 100644 --- a/docs/development/makefile.md +++ b/docs/development/makefile.md @@ -4,4 +4,4 @@ The Makefile contains all the commands that are run in the action. There are sep `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. +See [Inputs](../usage.md#inputs) for information about the available parameters. All variables should be specified in CAPITALIZED form. diff --git a/docs/home.md b/docs/home.md index f7e2096..e8b6e75 100644 --- a/docs/home.md +++ b/docs/home.md @@ -2,7 +2,6 @@ Welcome to the build-container-installer wiki! ## Index -- [Usage](usage.md) - Development - [Using the Makefile](development/makefile.md) - [Using the Container](development/container.md) @@ -11,4 +10,4 @@ Welcome to the build-container-installer wiki! - Examples - [Adding Flatpaks](examples/adding-flatpaks.md) -- [Known Errors](known_errors.md) +- [Known Errors](known_errors.md) \ No newline at end of file diff --git a/docs/usage.md b/docs/usage.md index 9ffeb8e..9f6a83f 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -22,8 +22,8 @@ This action is designed to be called from a GitHub workflow using the following 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 + ${{ steps.build.outputs.iso_path }} + ${{ steps.build.outputs.iso_path }}-CHECKSUM if-no-files-found: error retention-days: 0 compression-level: 0 @@ -65,4 +65,4 @@ Variant will be the third item in the package name. Example: `fedora-release-kin | 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 }} | +| iso_path | The name and path of the resulting .iso | ${{ steps.YOUR_ID_FOR_ACTION.outputs.iso_name }} | \ No newline at end of file diff --git a/external/Makefile b/external/Makefile index 0cac3e7..74047b1 100644 --- a/external/Makefile +++ b/external/Makefile @@ -1,6 +1,6 @@ lorax/branch-$(VERSION): 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 $(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: diff --git a/lorax_templates/Makefile b/lorax_templates/Makefile index b2e80e5..d022767 100644 --- a/lorax_templates/Makefile +++ b/lorax_templates/Makefile @@ -39,14 +39,10 @@ endef post_%.tmpl: scripts/post/% $(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: -FILES=$(wildcard post_*) install_include_post.tmpl +FILES=$(wildcard post_*) clean: ifneq ($(FILES),) rm -Rf $(FILES) -endif +endif \ No newline at end of file diff --git a/test/vm/Makefile b/test/vm/Makefile index 6578595..99288cb 100644 --- a/test/vm/Makefile +++ b/test/vm/Makefile @@ -24,7 +24,7 @@ ansible_inventory: .PHONY: $(VM_TESTS) 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: $(if $(wildcard files/mnt),,mkdir files/mnt) @@ -97,4 +97,4 @@ start_vm: install_os fi echo "VM ready for tests at IP $(VM_IP):$(VM_PORT)" - echo $$QEMU_PID > start_vm + echo $$QEMU_PID > start_vm \ No newline at end of file