@@ -49,26 +49,39 @@ jobs:
4949 sudo rm -rf "$AGENT_TOOLSDIRECTORY"
5050
515152+
53+ - uses : docker/setup-buildx-action@v3
54+
55+ - name : Login to Container Registry
56+ if : github.ref == 'refs/heads/main'
57+ run : |
58+ docker login ${{ env.REGISTRY }} -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASSWORD }}
59+
60+ - name : Extract metadata (tags, labels) for gotbot image
61+ id : ilab_meta
62+ uses : docker/metadata-action@v5
63+ with :
64+ images : |
65+ ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}/instructlab-${{ matrix.make_target }}
5266
5367 - name : Make Instructlab
5468 run : make instructlab
5569 working-directory : ./training/instructlab
5670
57- - name : Checkout buildah codebase
58- id : checkout-buildah
59- 71+ - name : Build and push ilab images
72+ uses : docker/build-push-action@v5
73+ working-directory :
6074 with :
61- repository : containers/buildah
62- path : buildah
63- ref : ' main'
64-
65- - name : Setup Buildah v1.36
66- working-directory : buildah
67- run : |
68- sudo apt-get -y -qq update
69- sudo apt-get -y install bats btrfs-progs git go-md2man golang libapparmor-dev libglib2.0-dev libgpgme11-dev libseccomp-dev libselinux1-dev make skopeo
70- make runc all SECURITYTAGS="apparmor seccomp"
71- sudo make install install.runc
75+ context : ./training/instructlab/instructlab
76+ platforms : linux/amd64
77+ build-args : |
78+ GIT_TAG=stable
79+ push : false
80+ tags : ${{ steps.ilab_meta.outputs.tags }}
81+ labels : ${{ steps.ilab_meta.outputs.labels }}
82+ # cache-from: type=gha
83+ # cache-to: type=gha,mode=max
84+ file : ./training/instructlab/${{ matrix.containerfile_path }}
7285
7386 - name : Build Image
7487 id : build_image
8396 instructlab/
8497
8598
86- - name : Login to Container Registry
87- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
88- uses :
redhat-actions/[email protected] 89- with :
90- registry : ${{ env.REGISTRY }}
91- username : ${{ secrets.REGISTRY_USER }}
92- password : ${{ secrets.REGISTRY_PASSWORD }}
93-
94- - name : Push image
95- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
96- uses :
redhat-actions/[email protected] 97- with :
98- image : ${{ steps.build_image.outputs.image }}
99- tags : ${{ steps.build_image.outputs.tags }}
100- registry : ${{ env.REGISTRY }}
10199
102100 - name : Publish Job Results to Slack
103101 id : slack
0 commit comments