diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d26c3c4414..92c44a82b2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,5 +9,3 @@ updates: directory: "/" schedule: interval: "weekly" - - diff --git a/.github/pull.yml b/.github/pull.yml index e71b45ac21..2f1369c90d 100644 --- a/.github/pull.yml +++ b/.github/pull.yml @@ -7,4 +7,4 @@ rules: upstream: template mergeMethod: rebase label: ":arrow_heading_down: pull" -conflictLabel: "merge-conflict" \ No newline at end of file +conflictLabel: "merge-conflict" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7e412c1f48..2c949ca8fc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,4 @@ # This workflow builds every branch of the repository daily at 20:22 UTC, one hour after ublue-os/nvidia builds. -# The images are also built after pushing changes or pull requests. -# The builds can also be triggered manually in the Actions tab thanks to workflow dispatch. -# Only the branch called `live` is published. name: build-ublue on: diff --git a/Containerfile b/Containerfile index e0266d8f01..dcc5edf740 100644 --- a/Containerfile +++ b/Containerfile @@ -1,12 +1,5 @@ -# This is the Containerfile for your custom image. - -# Instead of adding RUN statements here, you should consider creating a script -# in `config/scripts/`. Read more in `modules/script/README.md` - -# This Containerfile takes in the recipe, version, and base image as arguments, -# all of which are provided by build.yml when doing builds -# in the cloud. The ARGs have default values, but changing those -# does nothing if the image is built in the cloud. +# ! The ARGs have default values, but changing those ! +# ! does nothing if the image is built in the cloud. ! ARG IMAGE_MAJOR_VERSION="${IMAGE_MAJOR_VERSION:-38}" ARG BASE_IMAGE_URL=ghcr.io/ublue-os/silverblue-main @@ -15,17 +8,14 @@ FROM ${BASE_IMAGE_URL}:${IMAGE_MAJOR_VERSION} ARG IMAGE_MAJOR_VERSION="${IMAGE_MAJOR_VERSION:-38}" -# The default recipe is set to the recipe's default filename -# so that `podman build` should just work for most people. -ARG RECIPE=silverflow-nvidia.yml +ARG RECIPE=silverflow-nvidia.yml + # The default image registry to write to policy.json and cosign.yaml ARG IMAGE_REGISTRY=ghcr.io/ublue-os - COPY cosign.pub /usr/share/ublue-os/cosign.pub # Copy the bling from ublue-os/bling into tmp, to be installed later by the bling module -# Feel free to remove these lines if you want to speed up image builds and don't want any bling COPY --from=ghcr.io/ublue-os/bling:latest /rpms /tmp/bling/rpms COPY --from=ghcr.io/ublue-os/bling:latest /files /tmp/bling/files @@ -36,6 +26,7 @@ COPY config /tmp/config/ # Copy modules # The default modules are inside ublue-os/bling COPY --from=ghcr.io/ublue-os/bling:latest /modules /tmp/modules/ + # Custom modules overwrite defaults COPY modules /tmp/modules/ @@ -44,5 +35,5 @@ COPY modules /tmp/modules/ COPY --from=docker.io/mikefarah/yq /usr/bin/yq /usr/bin/yq # Run the build script, then clean up temp files and finalize container build. -RUN chmod +x /tmp/build.sh && /tmp/build.sh && \ +RUN chmod +x /tmp/build.sh && /tmp/build.sh && rm -rf /tmp/* /var/* && ostree container commit diff --git a/build.sh b/build.sh index f93a5b3f03..2576c9608d 100644 --- a/build.sh +++ b/build.sh @@ -39,7 +39,7 @@ run_module() { run_modules() { MODULES_FILE="$1" - readarray MODULES < <(yq -o=j -I=0 '.modules[]' "$MODULES_FILE" ) + readarray MODULES < <(yq -o=j -I=0 '.modules[]' "$MODULES_FILE") if [[ ${#MODULES[@]} -gt 0 ]]; then for MODULE in "${MODULES[@]}"; do run_module "$MODULE" diff --git a/config/files/usr/share/ublue-os/just/60-custom.just b/config/files/usr/share/ublue-os/just/60-custom.just index ed71cc7f35..ee2233f6e0 100644 --- a/config/files/usr/share/ublue-os/just/60-custom.just +++ b/config/files/usr/share/ublue-os/just/60-custom.just @@ -28,4 +28,4 @@ mamba: @echo "Get latest Miniforge3 version" curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" HOMEDIR=$( getent passwd "$USER" | cut -d: -f6 ) - bash Miniforge3-$(uname)-$(uname -m).sh -b -p "${HOMEDIR}/mambaforge/" \ No newline at end of file + bash Miniforge3-$(uname)-$(uname -m).sh -b -p "${HOMEDIR}/mambaforge/" diff --git a/config/scripts/cleanup.sh b/config/scripts/cleanup.sh index 8e4c2f963c..cc6dd3a152 100644 --- a/config/scripts/cleanup.sh +++ b/config/scripts/cleanup.sh @@ -10,4 +10,4 @@ rm -rf /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:phracek:PyCharm.repo rm -rf /etc/yum.repos.d/google-chrome.repo echo "After cleaning" -ls -l /etc/yum.repos.d/ \ No newline at end of file +ls -l /etc/yum.repos.d/ diff --git a/config/scripts/example.sh b/config/scripts/example.sh deleted file mode 100644 index fdb2e04276..0000000000 --- a/config/scripts/example.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -# Tell this script to exit if there are any errors. -# You should have this in every custom script, to ensure that your completed -# builds actually ran successfully without any errors! -set -oue pipefail - -# Your code goes here. -echo 'This is an example shell script' -echo 'Scripts here will run during build if specified in recipe.yml' diff --git a/config/scripts/openrazer.sh b/config/scripts/openrazer.sh index 3eaed778d8..f47c227a52 100644 --- a/config/scripts/openrazer.sh +++ b/config/scripts/openrazer.sh @@ -2,4 +2,4 @@ set -oue pipefail -getent group plugdev >/dev/null || groupadd -r plugdev \ No newline at end of file +getent group plugdev >/dev/null || groupadd -r plugdev diff --git a/config/scripts/signing.sh b/config/scripts/signing.sh index 5f0f0e3a8f..703f0fab5d 100644 --- a/config/scripts/signing.sh +++ b/config/scripts/signing.sh @@ -24,7 +24,7 @@ yq -i -o=j '.transports.docker |= + .' "$FILE" IMAGE_REF="ostree-image-signed:docker://$IMAGE_REGISTRY/$IMAGE_NAME" -printf '{\n"image-ref": "'"$IMAGE_REF"'",\n"image-tag": "latest"\n}' > /usr/share/ublue-os/image-info.json +printf '{\n"image-ref": "'"$IMAGE_REF"'",\n"image-tag": "latest"\n}' >/usr/share/ublue-os/image-info.json cp /usr/etc/containers/registries.d/ublue-os.yaml /usr/etc/containers/registries.d/"$IMAGE_NAME".yaml sed -i "s ghcr.io/ublue-os $IMAGE_REGISTRY g" /usr/etc/containers/registries.d/"$IMAGE_NAME".yaml diff --git a/config/silverflow-nvidia-38.yml b/config/silverflow-nvidia-38.yml index 2d66662581..62e93f29c4 100644 --- a/config/silverflow-nvidia-38.yml +++ b/config/silverflow-nvidia-38.yml @@ -28,4 +28,4 @@ modules: - type: script scripts: - - openrazer.sh \ No newline at end of file + - openrazer.sh