Skip to content

Commit cf4b275

Browse files
mergify[bot]tthvo
andauthored
ci(tools): use podman for building container images (#1290) (#1291)
Signed-off-by: Thuan Vo <[email protected]> (cherry picked from commit f366d4b) Co-authored-by: Thuan Vo <[email protected]>
1 parent ed30463 commit cf4b275

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/pr-ci.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
types:
1010
- created
1111

12+
env:
13+
OPENSUSE_UNOFFICIAL_LIBCONTAINERS_KEY_URL: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/Release.key"
14+
OPENSUSE_UNOFFICIAL_LIBCONTAINERS_SOURCE_URL: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04"
15+
1216
jobs:
1317
check-before-build:
1418
runs-on: ubuntu-latest
@@ -85,6 +89,16 @@ jobs:
8589
java-version: '17'
8690
distribution: 'adopt'
8791
cache: maven
92+
- name: Install podman v4
93+
run: |
94+
echo "deb $OPENSUSE_UNOFFICIAL_LIBCONTAINERS_SOURCE_URL/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list
95+
curl -fsSL $OPENSUSE_UNOFFICIAL_LIBCONTAINERS_KEY_URL | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable.gpg > /dev/null
96+
sudo apt -y purge podman
97+
sudo apt update && sudo apt -y install podman
98+
- name: Start Podman API
99+
run: systemctl --user enable --now podman.socket
100+
- name: Set DOCKER_HOST environment variable
101+
run: echo "DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock" >> "$GITHUB_ENV"
88102
- name: Build Cryostat application image
89103
id: build-cryostat-image
90104
run: |
@@ -102,8 +116,6 @@ jobs:
102116
-Dquarkus.container-image.tag=pr-${{ env.PR_num }}-${{ env.head_sha }} \
103117
clean package
104118
podman images
105-
docker images
106-
podman pull docker-daemon:ghcr.io/${{ github.repository_owner }}/cryostat-web:pr-${{ env.PR_num }}-${{ env.head_sha }}
107119
- name: Push PR test image to ghcr.io
108120
id: push-to-ghcr
109121
uses: redhat-actions/push-to-registry@v2

0 commit comments

Comments
 (0)