|
21 | 21 | pull_request: |
22 | 22 | types: [labeled, synchronize, opened, ready_for_review, reopened] |
23 | 23 |
|
| 24 | +permissions: |
| 25 | + contents: read |
| 26 | + |
24 | 27 | jobs: |
25 | 28 | # Dedicated step to build the extension image |
26 | 29 | build-container: |
@@ -64,65 +67,70 @@ jobs: |
64 | 67 | # ============================================== |
65 | 68 | # Installing Podman |
66 | 69 | # ============================================== |
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 |
110 | | -
|
| 70 | + - name: Install Podman v5 using external action |
| 71 | + uses: redhat-actions/podman-install@15cb93f5a6b78a758fd8f4d1cecbf6651d4bcea3 |
| 72 | + with: |
| 73 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 74 | + |
| 75 | +# - name: Install podman to 5.x |
| 76 | +# if: runner.os == 'Windows' |
| 77 | +# shell: pwsh |
| 78 | +# run: | |
| 79 | +# echo Installing Podman |
| 80 | +# curl --output .\podman-setup.exe -L https://github.com/containers/podman/releases/download/v5.3.2/podman-5.3.2-setup.exe |
| 81 | +# # Start the installer and wait for it to complete |
| 82 | +# Start-Process -FilePath .\podman-setup.exe -ArgumentList "/install", "/passive", "/norestart", "/log podman-logs.txt" -Wait |
| 83 | +# # Check the logs for debugging purposes |
| 84 | +# Get-Content podman-logs.txt |
| 85 | +# |
| 86 | +# # Init Podman Machine |
| 87 | +# - name: Init Podman Machine (Windows) |
| 88 | +# if: runner.os == 'Windows' |
| 89 | +# shell: pwsh |
| 90 | +# run: | |
| 91 | +# echo "Adding Podman to PATH" |
| 92 | +# $env:PATH += ";C:\Program Files\RedHat\Podman" |
| 93 | +# podman --version |
| 94 | +# podman machine init --now |
| 95 | +# |
| 96 | +# # Update Podman linux |
| 97 | +# - name: Update podman to 5.x |
| 98 | +# if: runner.os == 'Linux' |
| 99 | +# run: | |
| 100 | +# echo "ubuntu version from kubic repository to install podman we need (v5)" |
| 101 | +# ubuntu_version='23.10' |
| 102 | +# echo "Add unstable kubic repo into list of available sources and get the repo key" |
| 103 | +# 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" |
| 104 | +# curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" | sudo apt-key add - |
| 105 | +# echo "Updating all dependencies..." |
| 106 | +# sudo apt-get update -qq |
| 107 | +# echo "install necessary dependencies for criu package which is not part of ${ubuntu_version}" |
| 108 | +# sudo apt-get install -qq libprotobuf32t64 python3-protobuf libnet1 |
| 109 | +# echo "install criu manually from static location" |
| 110 | +# 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 |
| 111 | +# echo "installing/update podman package..." |
| 112 | +# sudo apt-get -qq -y install podman || { echo "Start fallback steps for podman nightly installation from a static mirror" && \ |
| 113 | +# 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" && \ |
| 114 | +# curl -L "http://ftp.lysator.liu.se/pub/opensuse/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" | sudo apt-key add - && \ |
| 115 | +# sudo apt-get update && \ |
| 116 | +# sudo apt-get -y install podman; } |
| 117 | +# podman version |
| 118 | +# |
111 | 119 | - name: Revert unprivileged user namespace restrictions in Ubuntu 24.04 |
112 | 120 | if: runner.os == 'Linux' |
113 | 121 | run: | |
114 | 122 | # allow unprivileged user namespace |
115 | 123 | sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 |
116 | | -
|
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 |
| 124 | +# |
| 125 | +# - name: Set cgroup_manager to 'cgroupfs' instead of systemd |
| 126 | +# if: runner.os == 'Linux' |
| 127 | +# run: | |
| 128 | +# mkdir -p ~/.config/containers |
| 129 | +# cat <<EOT >> ~/.config/containers/containers.conf |
| 130 | +# [engine] |
| 131 | +# cgroup_manager="cgroupfs" |
| 132 | +# EOT |
| 133 | +# podman info |
126 | 134 |
|
127 | 135 | # ============================================== |
128 | 136 | # Installing Podman Desktop |
|
0 commit comments