Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
🌈 style(*): minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
c0deplayer committed Oct 2, 2023
1 parent 65760b2 commit 9f4f8f6
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 37 deletions.
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@ updates:
directory: "/"
schedule:
interval: "weekly"


2 changes: 1 addition & 1 deletion .github/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ rules:
upstream: template
mergeMethod: rebase
label: ":arrow_heading_down: pull"
conflictLabel: "merge-conflict"
conflictLabel: "merge-conflict"
3 changes: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
21 changes: 6 additions & 15 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand All @@ -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/

Expand All @@ -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
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion config/files/usr/share/ublue-os/just/60-custom.just
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
bash Miniforge3-$(uname)-$(uname -m).sh -b -p "${HOMEDIR}/mambaforge/"
2 changes: 1 addition & 1 deletion config/scripts/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
ls -l /etc/yum.repos.d/
10 changes: 0 additions & 10 deletions config/scripts/example.sh

This file was deleted.

2 changes: 1 addition & 1 deletion config/scripts/openrazer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -oue pipefail

getent group plugdev >/dev/null || groupadd -r plugdev
getent group plugdev >/dev/null || groupadd -r plugdev
2 changes: 1 addition & 1 deletion config/scripts/signing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion config/silverflow-nvidia-38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ modules:

- type: script
scripts:
- openrazer.sh
- openrazer.sh

0 comments on commit 9f4f8f6

Please sign in to comment.