@@ -29,44 +29,39 @@ jobs:
29
29
steps :
30
30
- uses : actions/checkout@v4
31
31
32
- - name : Update podman
32
+ - name : build package
33
33
run : |
34
- # ubuntu version from kubic repository to install podman we need (v5)
35
- ubuntu_version='23.10'
36
- 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"
37
- curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" | sudo apt-key add -
38
- # install necessary dependencies for criu package which is not part of 23.10
39
- sudo apt-get install -qq libprotobuf32t64 python3-protobuf libnet1
40
- # install criu manually from static location
41
- curl -sLO http://cz.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
42
- sudo apt-get update -qq
43
- sudo apt-get -qq -y install podman || { echo "Start fallback steps for podman nightly installation from a static mirror" && \
44
- 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" && \
45
- curl -L "http://ftp.lysator.liu.se/pub/opensuse/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" | sudo apt-key add - && \
46
- sudo apt-get update && \
47
- sudo apt-get -y install podman; }
48
- podman version
34
+ pip install --upgrade build
35
+ python -m build
49
36
50
37
- name : Install qemu dependency
51
38
run : |
52
39
sudo apt-get update
53
40
sudo apt-get install -y qemu-user-static
54
41
55
- - name : build package
56
- run : |
57
- pip install --upgrade build
58
- python -m build
42
+ - name : build image
43
+ id : build-image
44
+ uses : redhat-actions/buildah-build@v2
45
+ with :
46
+ image : podman-ai-lab-stack
47
+ tags : nightly ${{ github.sha }}
48
+ platforms : linux/amd64, linux/arm64
49
+ containerfiles : |
50
+ build/Containerfile
51
+ context : .
52
+ oci : true
59
53
60
- - name : Login to ghcr.io
61
- run : podman login --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io
54
+ - name : Log in to ghcr.io
55
+ uses : redhat-actions/podman-login@v1
56
+ with :
57
+ username : ${{ github.actor }}
58
+ password : ${{ secrets.GITHUB_TOKEN }}
59
+ registry : ghcr.io
62
60
63
- - name : Publish Image
64
- id : publish-image
65
- run : |
66
- IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/podman-ai-lab-stack
67
- IMAGE_NIGHTLY=${IMAGE_NAME}:nightly
68
- IMAGE_SHA=${IMAGE_NAME}:${GITHUB_SHA}
69
- podman manifest create ${IMAGE_NIGHTLY}
70
- podman build --platform linux/amd64,linux/arm64 . -f build/Containerfile --manifest ${IMAGE_NIGHTLY}
71
- podman manifest push ${IMAGE_NIGHTLY} docker://${IMAGE_NIGHTLY}
72
- podman manifest push ${IMAGE_NIGHTLY} docker://${IMAGE_SHA}
61
+ - name : publish image to ghcr.io
62
+ id : push-to-ghcr
63
+ uses : redhat-actions/push-to-registry@v2
64
+ with :
65
+ image : ${{ steps.build-image.outputs.image }}
66
+ tags : ${{ steps.build-image.outputs.tags }}
67
+ registry : ghcr.io/${{ github.repository_owner }}
0 commit comments