From 4e0b810e284e83abc3a1a00f77431f6d753b540f Mon Sep 17 00:00:00 2001 From: Ajam Date: Thu, 24 Oct 2024 13:43:34 +0545 Subject: [PATCH] fix flatpak --- .../workflows/healthchecks_housekeeping.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/healthchecks_housekeeping.yaml b/.github/workflows/healthchecks_housekeeping.yaml index fae20153..7cd6c520 100644 --- a/.github/workflows/healthchecks_housekeeping.yaml +++ b/.github/workflows/healthchecks_housekeeping.yaml @@ -76,6 +76,11 @@ jobs: #GH Dirs mkdir -p "${GITHUB_WORKSPACE}/main/aarch64-Linux" mkdir -p "${GITHUB_WORKSPACE}/main/x86_64-Linux" + #Setup Flatpak + sudo apt update -y -qq + sudo apt install flatpak -y + sudo usermod -aG "_flatpak" "runner" + #-------------# #Setup HF git config --global "credential.helper" store git config --global "user.email" "AjamX101@gmail.com" @@ -200,13 +205,14 @@ jobs: #Presets set +x ; set +e #--------------# - ##Install Flatpak - sudo apt install flatpak -y - sudo flatpak remote-add --if-not-exists flathub "https://dl.flathub.org/repo/flathub.flatpakrepo" - flatpak --user remote-add --if-not-exists flathub "https://dl.flathub.org/repo/flathub.flatpakrepo" #Generate Data + sudo flatpak remote-add --if-not-exists flathub "https://dl.flathub.org/repo/flathub.flatpakrepo" + flatpak --user remote-add --if-not-exists flathub "https://dl.flathub.org/repo/flathub.flatpakrepo" 2>/dev/null + sudo flatpak search "cpu-x" + sudo flatpak install --noninteractive --or-update --assumeyes flathub "io.github.thetumultuousunicornofdarkness.cpu-x" + ls "/var/lib/flatpak/appstream/flathub/x86_64/active/" -lah if command -v flatpak &> /dev/null; then - FLATPAK_APPSTREAM="$(find "/var/lib/flatpak" -type f -name "appstream.xml" -print | xargs realpath)" && export FLATPAK_APPSTREAM="${FLATPAK_APPSTREAM}" + FLATPAK_APPSTREAM="$(sudo find "/var/lib/flatpak" -type f -name "appstream.xml" -print 2>/dev/null | xargs realpath | head -n 1)" && export FLATPAK_APPSTREAM="${FLATPAK_APPSTREAM}" if [[ -f "${FLATPAK_APPSTREAM}" ]] && [[ $(stat -c%s "${FLATPAK_APPSTREAM}") -gt 10000 ]]; then cat "${FLATPAK_APPSTREAM}" > "${GITHUB_WORKSPACE}/main/FLATPAK_APPSTREAM.xml" rm -rvf "/tmp/FLATPAK_APPS.tmp.txt" 2>/dev/null @@ -737,4 +743,4 @@ jobs: rclone copyto "${GITHUB_WORKSPACE}/main/x86_64-Linux/METADATA.AIO.yaml.zstd" "r2:/bin/x86_64_Linux/METADATA.AIO.yaml.zstd" --checksum --check-first --user-agent="${USER_AGENT}" rclone copyto "${GITHUB_WORKSPACE}/main/x86_64-Linux/METADATA.AIO.yaml.zstd.bsum" "r2:/bin/x86_64_Linux/METADATA.AIO.yaml.zstd.bsum" --checksum --check-first --user-agent="${USER_AGENT}" continue-on-error: true -#------------------------------------------------------------------------------------# \ No newline at end of file +#------------------------------------------------------------------------------------#