From 3071921f4306c3fd08c594d0a47c0441ce91f2fe Mon Sep 17 00:00:00 2001 From: iTrooz_ Date: Thu, 13 Oct 2022 18:52:07 +0200 Subject: [PATCH] add support for Arch Linux and Fedora containers (#134) Co-authored-by: Max Schmitt --- lib/index.js | 5 +++++ src/index.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lib/index.js b/lib/index.js index a7da90ec..44a6af14 100644 --- a/lib/index.js +++ b/lib/index.js @@ -12576,6 +12576,11 @@ async function run() { if (distro === "alpine") { // for set -e workaround, we need to install bash because alpine doesn't have it await execShellCommand(optionalSudoPrefix + 'apk add openssh-client xz bash'); + } else if (distro === "arch") { + // partial upgrades are not supported so also upgrade everything + await execShellCommand(optionalSudoPrefix + 'pacman -Syu --noconfirm xz openssh'); + } else if (distro === "fedora") { + await execShellCommand(optionalSudoPrefix + 'dnf install -y xz openssh'); } else { await execShellCommand(optionalSudoPrefix + 'apt-get update'); await execShellCommand(optionalSudoPrefix + 'apt-get install -y openssh-client xz-utils'); diff --git a/src/index.js b/src/index.js index 52f77e79..99773b66 100644 --- a/src/index.js +++ b/src/index.js @@ -40,6 +40,11 @@ export async function run() { if (distro === "alpine") { // for set -e workaround, we need to install bash because alpine doesn't have it await execShellCommand(optionalSudoPrefix + 'apk add openssh-client xz bash'); + } else if (distro === "arch") { + // partial upgrades are not supported so also upgrade everything + await execShellCommand(optionalSudoPrefix + 'pacman -Syu --noconfirm xz openssh'); + } else if (distro === "fedora") { + await execShellCommand(optionalSudoPrefix + 'dnf install -y xz openssh'); } else { await execShellCommand(optionalSudoPrefix + 'apt-get update'); await execShellCommand(optionalSudoPrefix + 'apt-get install -y openssh-client xz-utils');