Skip to content

Commit ab44d17

Browse files
Use Podman 5 with rootful socket access in CI
1 parent 23d0e09 commit ab44d17

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

.github/actions/podman-setup/action.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,22 @@ runs:
66
- name: Install Podman
77
uses: redhat-actions/podman-install@5bc2ecc87c737059124c295845be51ee7297fb89
88
with:
9-
ubuntu-repository: kubic
10-
ubuntu-version: "24.04"
9+
ubuntu-repository: questing
1110

1211
- name: Configure Podman
1312
shell: bash
1413
run: |
15-
sudo systemctl enable --now podman.socket
14+
PODMAN_VERSION="$(podman --version | awk '{print $3}')"
15+
if [[ "${PODMAN_VERSION}" != 5.* ]]; then
16+
echo "Expected Podman 5.x, got ${PODMAN_VERSION}"
17+
exit 1
18+
fi
19+
20+
sudo mkdir -p /etc/systemd/system/podman.socket.d
21+
printf '[Socket]\nSocketUser=%s\nSocketMode=0600\n' "$(id -un)" | sudo tee /etc/systemd/system/podman.socket.d/runner.conf
22+
sudo systemctl daemon-reload
23+
sudo systemctl enable podman.socket
24+
sudo systemctl restart podman.socket
1625
podman --url=unix:///run/podman/podman.sock info
1726
echo "DOCKER_HOST=unix:///run/podman/podman.sock" >> $GITHUB_ENV
1827
echo "CI_PODMAN=true" >> $GITHUB_ENV

0 commit comments

Comments
 (0)