Skip to content

Commit

Permalink
Avoiding flatpak install in CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
ceiphr committed Jun 28, 2023
1 parent d491cf5 commit 589caee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ jobs:
echo 'ENV CI=true'
echo '# Install packages'
echo 'RUN dnf -y update'
echo 'RUN dnf -y install flatpak git dnf-plugins-core zsh'
echo 'RUN dnf -y install git dnf-plugins-core'
echo 'RUN dnf clean all'
echo '# Create user'
echo 'RUN adduser testuser'
echo 'RUN su - testuser'
echo '# Copy dotfiles'
echo 'COPY dotfiles dotfiles'
echo 'WORKDIR /dotfiles'
Expand Down
5 changes: 4 additions & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ function install_dnf() {

function install_flatpak() {
echo -e "${TXT_GREEN}>${TXT_DEFAULT} Installing Flatpak packages..."

# Note: Must be run after install_dnf. flatpak is installed via dnf.
flatpak update -y || error "Unable to update flatpak."
flatpak remote-add -u --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo >/dev/null 2>&1 || error "Unable to add flathub remote."
flatpak install -u -y $(cat packages/flatpak) || error "Unable to install flatpak packages."
Expand Down Expand Up @@ -201,7 +203,8 @@ function install_pkgs() {
# Install OS-specific packages
if [[ "$ID" == "fedora" ]] || [[ $ID == "rhel" ]]; then
install_dnf
install_flatpak
# Note: Flatpak errors when run as root in CI. Don't install flatpak in CI.
[[ ! "$CI" ]] && install_flatpak
elif [[ $ID == "ubuntu" ]] || [[ "$CODESPACES" ]]; then
install_apt
else
Expand Down

0 comments on commit 589caee

Please sign in to comment.