mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 14:17:22 +00:00
[ubuntu] Refactor bash functions (#9055)
This commit is contained in:
committed by
GitHub
parent
d16bc5f120
commit
503ae89818
@@ -10,14 +10,14 @@ source $HELPER_SCRIPTS/os.sh
|
||||
# pin podman due to https://github.com/actions/runner-images/issues/7753
|
||||
# https://bugs.launchpad.net/ubuntu/+source/libpod/+bug/2024394
|
||||
#
|
||||
if isUbuntu20; then
|
||||
if is_ubuntu20; then
|
||||
install_packages=(podman buildah skopeo)
|
||||
else
|
||||
install_packages=(podman=3.4.4+ds1-1ubuntu1 buildah skopeo)
|
||||
fi
|
||||
|
||||
# Packages is available in the official Ubuntu upstream starting from Ubuntu 21
|
||||
if isUbuntu20; then
|
||||
if is_ubuntu20; then
|
||||
REPO_URL="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable"
|
||||
source /etc/os-release
|
||||
sh -c "echo 'deb ${REPO_URL}/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
|
||||
@@ -31,7 +31,7 @@ apt-get -y install ${install_packages[@]}
|
||||
mkdir -p /etc/containers
|
||||
printf "[registries.search]\nregistries = ['docker.io', 'quay.io']\n" | tee /etc/containers/registries.conf
|
||||
|
||||
if isUbuntu20; then
|
||||
if is_ubuntu20; then
|
||||
# Remove source repo
|
||||
rm /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
|
||||
# Document source repo
|
||||
|
||||
Reference in New Issue
Block a user