Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bayou-brogrammer committed Feb 11, 2024
1 parent efb2029 commit f5acc10
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 30 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ env:
ACT:
IMAGE_NAME:
AKMODS_FLAVOR:
TEST_TAG: user/app:test
LATEST_TAG: user/app:latest

DOCKER_BUILDKIT: 1
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}

jobs:
Expand Down Expand Up @@ -55,10 +55,14 @@ jobs:
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Check just syntax
uses: ublue-os/just-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
config: buildkit.toml

- name: Install dependencies
run: |
sudo apt-get -y update
Expand Down Expand Up @@ -203,13 +207,6 @@ jobs:
# IMAGE_VENDOR=${{ github.repository_owner }}
# FEDORA_MAJOR_VERSION=${{ matrix.major_version }}

- run: |
dirs=(rpm-ostree dnf yum bluefin bluefin-dx asus-firmware akmods gnome-prompt)
for dir in "${dirs[@]}"; do
sudo mkdir -p /var/cache/$dir
sudo chown -R $USER:$USER /var/cache/$dir
done
# Build image using Buildah action
- name: Build Image
id: build_image
Expand All @@ -230,13 +227,6 @@ jobs:
FEDORA_MAJOR_VERSION=${{ matrix.major_version }}
extra-args: |
--target=${{ matrix.base_name }}
-v /var/cache/dnf:/var/cache/dnf:O
-v /var/cache/yum:/var/cache/yum:O
-v /var/cache/akmods:/var/cache/akmods:O
-v /var/cache/bluefin:/var/cache/bluefin:O
-v /var/cache/bluefin-dx:/var/cache/bluefin-dx:O
-v /var/cache/asus-firmware:/var/cache/asus-firmware:O
-v /var/cache/gnome-prompt:/var/cache/gnome-prompt:O
# Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR.
# https://github.com/macbre/push-to-ghcr/issues/12
Expand Down
38 changes: 27 additions & 11 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1.3-labs

ARG BASE_HUB="ghcr.io/ublue-os"
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-main}"
ARG AKMODS_FLAVOR="${AKMODS_FLAVOR:-main}"
Expand Down Expand Up @@ -51,20 +53,34 @@ RUN if [[ "${IMAGE_FLAVOR}" =~ "asus" ]]; then \

# Add ublue kmods, add needed negativo17 repo and then immediately disable due to incompatibility with RPMFusion
COPY --from=bluefin-akmods /rpms /tmp/akmods-rpms
RUN <<EOF
RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \
wget https://negativo17.org/repos/fedora-multimedia.repo -O /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo
rpm-ostree install \
/tmp/akmods-rpms/kmods/*evdi*.rpm \
/tmp/akmods-rpms/kmods/*xpadneo*.rpm \
/tmp/akmods-rpms/kmods/*xone*.rpm \
/tmp/akmods-rpms/kmods/*openrazer*.rpm \
/tmp/akmods-rpms/kmods/*ryzen-smu*.rpm \
/tmp/akmods-rpms/kmods/*v4l2loopback*.rpm \
/tmp/akmods-rpms/kmods/*zenergy*.rpm \
/tmp/akmods-rpms/kmods/*wl*.rpm
/tmp/akmods-rpms/kmods/*xpadneo*.rpm \
/tmp/akmods-rpms/kmods/*xone*.rpm \
/tmp/akmods-rpms/kmods/*openrazer*.rpm \
/tmp/akmods-rpms/kmods/*v4l2loopback*.rpm \
/tmp/akmods-rpms/kmods/*wl*.rpm && \
if grep -qv "asus" <<< "${AKMODS_FLAVOR}"; then \
rpm-ostree install \
/tmp/akmods-rpms/kmods/*evdi*.rpm \
; fi && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo
EOF

# RUN <<EOF
# wget https://negativo17.org/repos/fedora-multimedia.repo -O /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \
# sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo
# rpm-ostree install \
# /tmp/akmods-rpms/kmods/*evdi*.rpm \
# /tmp/akmods-rpms/kmods/*xpadneo*.rpm \
# /tmp/akmods-rpms/kmods/*xone*.rpm \
# /tmp/akmods-rpms/kmods/*openrazer*.rpm \
# /tmp/akmods-rpms/kmods/*ryzen-smu*.rpm \
# /tmp/akmods-rpms/kmods/*v4l2loopback*.rpm \
# /tmp/akmods-rpms/kmods/*zenergy*.rpm \
# /tmp/akmods-rpms/kmods/*wl*.rpm
# sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo
# EOF

# GNOME VRR & Prompt
RUN rpm-ostree override replace \
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ IMAGE_FLAVOR="${IMAGE_FLAVOR:-asus}"
AKMODS_FLAVOR="${AKMODS_FLAVOR:-asus}"
FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-39}"

$CONTAINER_CMD build . -f Containerfile \
$CONTAINER_CMD build . \
--build-arg IMAGE_FLAVOR=$IMAGE_FLAVOR \
--build-arg AKMODS_FLAVOR=$AKMODS_FLAVOR \
--build-arg FEDORA_MAJOR_VERSION=$FEDORA_MAJOR_VERSION
2 changes: 2 additions & 0 deletions buildkit.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[worker.oci]
max-parallelism = 4

0 comments on commit f5acc10

Please sign in to comment.