Skip to content

Commit

Permalink
ci(tools): use podman for building container images (#1290) (#1291)
Browse files Browse the repository at this point in the history
Signed-off-by: Thuan Vo <[email protected]>
(cherry picked from commit f366d4b)

Co-authored-by: Thuan Vo <[email protected]>
  • Loading branch information
mergify[bot] and tthvo authored Jun 24, 2024
1 parent ed30463 commit cf4b275
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
types:
- created

env:
OPENSUSE_UNOFFICIAL_LIBCONTAINERS_KEY_URL: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/Release.key"
OPENSUSE_UNOFFICIAL_LIBCONTAINERS_SOURCE_URL: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04"

jobs:
check-before-build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -85,6 +89,16 @@ jobs:
java-version: '17'
distribution: 'adopt'
cache: maven
- name: Install podman v4
run: |
echo "deb $OPENSUSE_UNOFFICIAL_LIBCONTAINERS_SOURCE_URL/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list
curl -fsSL $OPENSUSE_UNOFFICIAL_LIBCONTAINERS_KEY_URL | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable.gpg > /dev/null
sudo apt -y purge podman
sudo apt update && sudo apt -y install podman
- name: Start Podman API
run: systemctl --user enable --now podman.socket
- name: Set DOCKER_HOST environment variable
run: echo "DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock" >> "$GITHUB_ENV"
- name: Build Cryostat application image
id: build-cryostat-image
run: |
Expand All @@ -102,8 +116,6 @@ jobs:
-Dquarkus.container-image.tag=pr-${{ env.PR_num }}-${{ env.head_sha }} \
clean package
podman images
docker images
podman pull docker-daemon:ghcr.io/${{ github.repository_owner }}/cryostat-web:pr-${{ env.PR_num }}-${{ env.head_sha }}
- name: Push PR test image to ghcr.io
id: push-to-ghcr
uses: redhat-actions/push-to-registry@v2
Expand Down

0 comments on commit cf4b275

Please sign in to comment.