Skip to content

Commit b04068f

Browse files
committed
ci: install podman with action
Signed-off-by: Philippe Martin <[email protected]>
1 parent 3926b51 commit b04068f

File tree

1 file changed

+5
-54
lines changed

1 file changed

+5
-54
lines changed

.github/workflows/e2e-tests.yaml

Lines changed: 5 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
strategy:
5252
fail-fast: false
5353
matrix:
54-
os: [ windows-2022, ubuntu-24.04 ]
54+
os: [ windows-2025, ubuntu-24.04 ]
5555
env:
5656
SKIP_INSTALLATION: true
5757
EXTENSION_PREINSTALLED: true
@@ -64,66 +64,17 @@ jobs:
6464
# ==============================================
6565
# Installing Podman
6666
# ==============================================
67-
- name: Install podman to 5.x
68-
if: runner.os == 'Windows'
69-
shell: pwsh
70-
run: |
71-
echo Installing Podman
72-
curl --output .\podman-setup.exe -L https://github.com/containers/podman/releases/download/v5.3.2/podman-5.3.2-setup.exe
73-
# Start the installer and wait for it to complete
74-
Start-Process -FilePath .\podman-setup.exe -ArgumentList "/install", "/passive", "/norestart", "/log podman-logs.txt" -Wait
75-
# Check the logs for debugging purposes
76-
Get-Content podman-logs.txt
77-
78-
# Init Podman Machine
79-
- name: Init Podman Machine (Windows)
80-
if: runner.os == 'Windows'
81-
shell: pwsh
82-
run: |
83-
echo "Adding Podman to PATH"
84-
$env:PATH += ";C:\Program Files\RedHat\Podman"
85-
podman --version
86-
podman machine init --now
87-
88-
# Update Podman linux
89-
- name: Update podman to 5.x
90-
if: runner.os == 'Linux'
91-
run: |
92-
echo "ubuntu version from kubic repository to install podman we need (v5)"
93-
ubuntu_version='23.10'
94-
echo "Add unstable kubic repo into list of available sources and get the repo key"
95-
sudo sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list"
96-
curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" | sudo apt-key add -
97-
echo "Updating all dependencies..."
98-
sudo apt-get update -qq
99-
echo "install necessary dependencies for criu package which is not part of ${ubuntu_version}"
100-
sudo apt-get install -qq libprotobuf32t64 python3-protobuf libnet1
101-
echo "install criu manually from static location"
102-
curl -sLO http://archive.ubuntu.com/ubuntu/pool/universe/c/criu/criu_3.16.1-2_amd64.deb && sudo dpkg -i criu_3.16.1-2_amd64.deb
103-
echo "installing/update podman package..."
104-
sudo apt-get -qq -y install podman || { echo "Start fallback steps for podman nightly installation from a static mirror" && \
105-
sudo sh -c "echo 'deb http://ftp.lysator.liu.se/pub/opensuse/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list" && \
106-
curl -L "http://ftp.lysator.liu.se/pub/opensuse/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" | sudo apt-key add - && \
107-
sudo apt-get update && \
108-
sudo apt-get -y install podman; }
109-
podman version
67+
- name: Install Podman v5 using external action
68+
uses: redhat-actions/podman-install@15cb93f5a6b78a758fd8f4d1cecbf6651d4bcea3
69+
with:
70+
github-token: ${{ secrets.GITHUB_TOKEN }}
11071

11172
- name: Revert unprivileged user namespace restrictions in Ubuntu 24.04
11273
if: runner.os == 'Linux'
11374
run: |
11475
# allow unprivileged user namespace
11576
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
11677
117-
- name: Set cgroup_manager to 'cgroupfs' instead of systemd
118-
if: runner.os == 'Linux'
119-
run: |
120-
mkdir -p ~/.config/containers
121-
cat <<EOT >> ~/.config/containers/containers.conf
122-
[engine]
123-
cgroup_manager="cgroupfs"
124-
EOT
125-
podman info
126-
12778
# ==============================================
12879
# Installing Podman Desktop
12980
# ==============================================

0 commit comments

Comments
 (0)