diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 468f3f7..f75d129 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,4 +1,5 @@ --- +# ba0fde3d-bee7-4307-b97b-17d0d20aff50 version: 2 updates: diff --git a/.github/workflows/build-iso.yml b/.github/workflows/build-iso.yml index 76a7f92..ee6b00b 100644 --- a/.github/workflows/build-iso.yml +++ b/.github/workflows/build-iso.yml @@ -1,7 +1,16 @@ --- +# ba0fde3d-bee7-4307-b97b-17d0d20aff50 name: Build ISOs on: workflow_dispatch: + inputs: + VARIANT: + description: 'Desktop variant to build' + required: true + type: choice + options: + - 'gnome' + - 'kde' concurrency: group: ${{ github.workflow }}-${{ github.ref || github.run_id }} @@ -17,6 +26,7 @@ jobs: PLATFORMS: ${{ steps.set.outputs.PLATFORMS }} IMAGE_PATH: ${{ steps.set.outputs.IMAGE_PATH }} IMAGE_NAME: ${{ steps.set.outputs.IMAGE_NAME }} + IMAGE_REF: ${{ steps.set.outputs.IMAGE_REF }} VARIANTS: ${{ steps.set.outputs.VARIANTS }} MATRIX: ${{ steps.set.outputs.MATRIX }} IS_SIGNED: ${{ steps.set.outputs.IS_SIGNED }} @@ -25,9 +35,7 @@ jobs: id: set run: | # Pick a latest tag based on the event type - if [[ "${{ github.event_name }}" == "pull_request" ]]; then - echo "LATEST_TAG=pr-${{ github.event.number }}" >> $GITHUB_OUTPUT - elif [[ "${{ github.ref }}" != "refs/heads/${{ github.event.repository.default_branch }}" ]]; then + if [[ "${{ github.ref }}" != "refs/heads/${{ github.event.repository.default_branch }}" ]]; then echo "LATEST_TAG=${{ github.ref_name }}" >> $GITHUB_OUTPUT else echo "LATEST_TAG=latest" >> $GITHUB_OUTPUT @@ -36,17 +44,23 @@ jobs: REGISTRY=quay.io REGISTRY_USER="almalinuxorg+airibarr_bot" IMAGE_PATH="almalinuxorg" + IMAGE_NAME=${{ github.event.repository.name }} PLATFORMS="amd64" VARIANTS="gnome,kde" echo "REGISTRY=${REGISTRY}" >> $GITHUB_OUTPUT echo "REGISTRY_USER=${REGISTRY_USER}" >> $GITHUB_OUTPUT echo "IMAGE_PATH=${IMAGE_PATH}" >> $GITHUB_OUTPUT - echo "IMAGE_NAME=${REGISTRY}/${IMAGE_PATH}/${{ github.event.repository.name }}" >> $GITHUB_OUTPUT + echo "IMAGE_NAME=${IMAGE_NAME}" >> $GITHUB_OUTPUT + echo "IMAGE_REF=${REGISTRY}/${IMAGE_PATH}/${IMAGE_NAME}" >> $GITHUB_OUTPUT echo "PLATFORMS=${PLATFORMS}" >> $GITHUB_OUTPUT echo "VARIANTS=${VARIANTS}" >> $GITHUB_OUTPUT - echo "MATRIX={\"variant\": $(echo $VARIANTS | jq -cR 'split(",")')}" >> $GITHUB_OUTPUT + if [[ "${{ inputs.VARIANT }}" == "ALL" ]]; then + echo "MATRIX={\"variant\": $(echo $VARIANTS | jq -cR 'split(",")')}" >> $GITHUB_OUTPUT + else + echo "MATRIX={\"variant\": '[\"${{ inputs.VARIANT }}\"]'}" >> $GITHUB_OUTPUT + fi # This is a workaround so that the expansion of secrets.SIGNING_SECRET doesn't break the if statement SECRET=$(cat <> $GITHUB_OUTPUT - elif [[ "${{ github.ref }}" != "refs/heads/${{ github.event.repository.default_branch }}" ]]; then + if [[ "${{ github.ref }}" != "refs/heads/${{ github.event.repository.default_branch }}" ]]; then echo "LATEST_TAG=${{ github.ref_name }}" >> $GITHUB_OUTPUT else echo "LATEST_TAG=latest" >> $GITHUB_OUTPUT @@ -42,13 +42,15 @@ jobs: REGISTRY=quay.io REGISTRY_USER="almalinuxorg+airibarr_bot" IMAGE_PATH="almalinuxorg" + IMAGE_NAME=${{ github.event.repository.name }} PLATFORMS="amd64" VARIANTS="gnome,kde" echo "REGISTRY=${REGISTRY}" >> $GITHUB_OUTPUT echo "REGISTRY_USER=${REGISTRY_USER}" >> $GITHUB_OUTPUT echo "IMAGE_PATH=${IMAGE_PATH}" >> $GITHUB_OUTPUT - echo "IMAGE_NAME=${REGISTRY}/${IMAGE_PATH}/${{ github.event.repository.name }}" >> $GITHUB_OUTPUT + echo "IMAGE_NAME=${IMAGE_NAME}" >> $GITHUB_OUTPUT + echo "IMAGE_REF=${REGISTRY}/${IMAGE_PATH}/${IMAGE_NAME}" >> $GITHUB_OUTPUT echo "PLATFORMS=${PLATFORMS}" >> $GITHUB_OUTPUT echo "VARIANTS=${VARIANTS}" >> $GITHUB_OUTPUT @@ -75,9 +77,9 @@ jobs: with: variant: ${{ matrix.variant }} containerfile: Dockerfile - image_name: "${{ github.event.repository.name }}-${{ matrix.variant }}" - previous_image: "${{ needs.set-env.outputs.IMAGE_NAME }}-${{ matrix.variant }}:latest" - update_origin_ref: "${{ needs.set-env.outputs.IMAGE_NAME }}-${{ matrix.variant }}:${{ needs.set-env.outputs.LATEST_TAG }}" + image_name: "${{ needs.set-env.outputs.IMAGE_NAME }}-${{ matrix.variant }}" + previous_image: "${{ needs.set-env.outputs.IMAGE_REF }}-${{ matrix.variant }}:latest" + update_origin_ref: "${{ needs.set-env.outputs.IMAGE_REF }}-${{ matrix.variant }}:${{ needs.set-env.outputs.LATEST_TAG }}" latest_tag: ${{ needs.set-env.outputs.LATEST_TAG }} update_is_signed: ${{ needs.set-env.outputs.IS_SIGNED == 'true' }} config_file: ./iso.toml diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 835fb97..a5d3d43 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -1,3 +1,5 @@ +--- +# ba0fde3d-bee7-4307-b97b-17d0d20aff50 name: Reusable Build on: workflow_call: @@ -50,7 +52,7 @@ on: jobs: build-image: name: Build image - uses: AlmaLinux/desktop-bootc-ci/.github/workflows/build-image.yml@v4 + uses: AlmaLinux/atomic-ci/.github/workflows/build-image.yml@v4 with: containerfile: ${{ inputs.containerfile }} image-name: ${{ inputs.image_name }} @@ -94,7 +96,7 @@ jobs: name: Promote image needs: [build-image, test-image] if: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} - uses: AlmaLinux/desktop-bootc-ci/.github/workflows/retag-image.yml@v4 + uses: AlmaLinux/atomic-ci/.github/workflows/retag-image.yml@v4 with: image: ${{ needs.build-image.outputs.image-ref }}@${{ needs.build-image.outputs.digest }} tag: | diff --git a/Dockerfile b/Dockerfile index 7bccad1..9ba3b54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ +# ba0fde3d-bee7-4307-b97b-17d0d20aff50 # Allow build scripts to be referenced without being copied into the final image FROM scratch AS ctx diff --git a/Makefile b/Makefile index 75d398d..e867b09 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +# ba0fde3d-bee7-4307-b97b-17d0d20aff50 SUDO = sudo PODMAN = $(SUDO) podman diff --git a/README.md b/README.md index baa5f48..d7300f7 100644 --- a/README.md +++ b/README.md @@ -1 +1,46 @@ -# Image template repository +# Purpose + +This repository builds the Atomic AlmaLinux base images. It takes the official +[AlmaLinux bootc images](https://github.com/AlmaLinux/bootc-images), adds a basic +desktop environment and smooths out some kinks. + +These images are the perfect base from which you can build your own Atomic AlmaLinux respin! +To make this easier, we've created [a template repository](https://github.com/new?template_name=atomic-respin-template&template_owner=AlmaLinux) +to get you started. Create your own Atomic AlmaLinux respin in minutes! + +# Contributing + +We welcome contributions to all parts of the AlmaLinux project. If you'd like to get involved, please feel free to reach out through [the chat](https://chat.almalinux.org/almalinux/channels/sigatomic)! + +## Contributing - Code and Design + +Before submitting code changes, please check if there are any open issues or pull requests that cover your proposal. If not, open an issue with a brief description and so you can discuss it with us first. This helps avoid duplicated work and ensures proposed changes align with project goals. This can be your anticipated workflow: + +- Create an issue describing your changes. +- Await confirmation from contributors. +- Fork the project. +- Create a new branch for your feature or bug fix. +- Add your code, documentation, etc. +- Submit a pull request (PR). All PRs should target the `main` branch. + +After review and approval, the changes will be merged and deployed. + +## Reporting a Bug + +If you find a bug, please report it [here](https://github.com/AlmaLinux/atomic-desktop/issues)! + +## Requesting a Feature + +We're open to feature requests! Please follow this workflow: + +1. [Search existing issues](https://github.com/AlmaLinux/atomic-desktop/issues) to see if the feature has already been requested. If so, give it a thumbs up, +1, or a comment on your use-case. +2. If no similar request exists, open a new issue. Please clearly explain why the feature is needed and provide a detailed use case. + +## Change Approval Process + +- Minor or cosmetic changes (typos, small style tweaks) can be reviewed and approved by any contributor with merge rights. +- Larger changes should be agreed on as a SIG. + +# Getting help + +This repo is managed by the Atomic SIG. You can see how best to contact us in the [AlmaLinux wiki](https://wiki.almalinux.org/sigs/Atomic.html). diff --git a/files/scripts/10-base.sh b/files/scripts/10-base.sh index 46c967c..1bf1f6e 100755 --- a/files/scripts/10-base.sh +++ b/files/scripts/10-base.sh @@ -2,15 +2,5 @@ set -xeuo pipefail -# Example of how you start customizing the image - dnf install -y 'dnf-command(config-manager)' dnf config-manager --set-enabled crb - -if [[ "${VARIANT}" == "gnome" ]]; then - echo "Installing gnome" -elif [[ "${VARIANT}" == "kde" ]]; then - echo "Installing kde" -else - echo "Neutral variant" -fi diff --git a/files/scripts/20-desktop.sh b/files/scripts/20-desktop.sh index 7f14e38..121611f 100755 --- a/files/scripts/20-desktop.sh +++ b/files/scripts/20-desktop.sh @@ -5,7 +5,7 @@ set -xeuo pipefail if [[ "${VARIANT}" == "gnome" ]]; then dnf install -y \ @"Workstation" - + systemctl enable gdm elif [[ "${VARIANT}" == "kde" ]]; then @@ -20,5 +20,7 @@ else fi - systemctl set-default graphical.target + +dnf -y remove \ + setroubleshoot diff --git a/iso.toml b/iso.toml index 430e27d..f3c5cee 100644 --- a/iso.toml +++ b/iso.toml @@ -1,3 +1,4 @@ +# ba0fde3d-bee7-4307-b97b-17d0d20aff50 [customizations.installer.kickstart] contents = """ %post --erroronfail --log=/root/anaconda-post.log