Skip to content

Commit 9aa2fb5

Browse files
committed
ci: Use more recent versions of Podman and Docker
1 parent cef2581 commit 9aa2fb5

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

.github/workflows/test.yml

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,63 @@ jobs:
6161
steps:
6262
- uses: actions/checkout@v4
6363

64-
- name: Install tool
64+
- name: Update docker version
65+
if: ${{ matrix.tool == 'docker' }}
66+
# https://docs.docker.com/engine/install/ubuntu#install-using-the-repository
67+
run: |
68+
# Add Docker's official GPG key:
69+
sudo apt-get update
70+
sudo apt-get install ca-certificates curl
71+
sudo install -m 0755 -d /etc/apt/keyrings
72+
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
73+
sudo chmod a+r /etc/apt/keyrings/docker.asc
74+
75+
# Add the repository to Apt sources:
76+
echo \
77+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
78+
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
79+
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
80+
sudo apt-get update
81+
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
82+
83+
- name: Update podman version
84+
if: ${{ matrix.tool == 'podman' }}
85+
# https://github.com/containers/podman/discussions/25582
86+
run: |
87+
# Define file paths
88+
PINNING_FILE="/etc/apt/preferences.d/podman-plucky.pref"
89+
SOURCE_LIST="/etc/apt/sources.list.d/plucky.list"
90+
91+
# Write plucky APT source list
92+
echo "Adding plucky repo to $SOURCE_LIST..."
93+
echo "deb http://archive.ubuntu.com/ubuntu plucky main universe" | \
94+
sudo tee "$SOURCE_LIST"
95+
96+
# Write APT pinning rules
97+
echo "Writing APT pinning rules to $PINNING_FILE..."
98+
cat <<EOF > /tmp/pinning_file
99+
Package: podman buildah golang-github-containers-common crun libgpgme11t64 libgpg-error0 golang-github-containers-image catatonit conmon containers-storage
100+
Pin: release n=plucky
101+
Pin-Priority: 991
102+
103+
Package: libsubid4 netavark passt aardvark-dns containernetworking-plugins libslirp0 slirp4netns
104+
Pin: release n=plucky
105+
Pin-Priority: 991
106+
107+
Package: *
108+
Pin: release n=plucky
109+
Pin-Priority: 400
110+
EOF
111+
sudo mv -f /tmp/pinning_file "$PINNING_FILE"
112+
113+
# Update APT cache
114+
echo "Updating APT package list..."
115+
sudo apt-get update
116+
117+
echo "plucky pinning setup complete."
118+
sudo apt-get install -y podman
119+
120+
- name: Install podman-compose provider
65121
if: ${{ matrix.tool == 'podman' }}
66122
env:
67123
PODMAN_COMPOSE_VERSION: "v1.3.0"

0 commit comments

Comments
 (0)