Skip to content

Commit

Permalink
add support for Arch Linux and Fedora containers (#134)
Browse files Browse the repository at this point in the history
Co-authored-by: Max Schmitt <[email protected]>
  • Loading branch information
iTrooz and mxschmitt authored Oct 13, 2022
1 parent 57508dd commit 3071921
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 3071921

Please sign in to comment.