Skip to content

Commit 894f5a7

Browse files
refactor to match upstream ilab
Signed-off-by: greg pereira <[email protected]>
1 parent bccb6a8 commit 894f5a7

File tree

1 file changed

+36
-41
lines changed

1 file changed

+36
-41
lines changed

.github/workflows/instructlab.yaml

Lines changed: 36 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -49,55 +49,50 @@ jobs:
4949
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
5050
5151
- uses: actions/[email protected]
52-
53-
- name: Make Instructlab
54-
run: make instructlab
55-
working-directory: ./training/instructlab
5652

57-
- name: Checkout buildah codebase
58-
id: checkout-buildah
59-
uses: actions/[email protected]
60-
with:
61-
repository: containers/buildah
62-
path: buildah
63-
ref: 'main'
53+
- uses: docker/setup-buildx-action@v3
6454

65-
- name: Setup Buildah v1.36
66-
working-directory: buildah
55+
- name: Login to Container Registry
56+
if: github.ref == 'refs/heads/main'
6757
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
58+
docker login ${{ env.REGISTRY }} -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASSWORD }}
7259
73-
- name: Build Image
74-
id: build_image
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 }}
66+
67+
- name: Make Instructlab
68+
run: make instructlab
7569
working-directory: ./training/instructlab
76-
run: |
77-
buildah --version
78-
buildah bud --platform linux/amd64 \
79-
-f ${{ matrix.containerfile_path }} \
80-
--format docker \
81-
--tls-verify=true \
82-
-t ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}/instructlab-${{ matrix.make_target}}:latest \
83-
instructlab/
84-
8570

86-
- name: Login to Container Registry
87-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
88-
uses: redhat-actions/[email protected]
71+
- name: Build and push ilab images
72+
uses: docker/build-push-action@v5
8973
with:
90-
registry: ${{ env.REGISTRY }}
91-
username: ${{ secrets.REGISTRY_USER }}
92-
password: ${{ secrets.REGISTRY_PASSWORD }}
74+
context: ./training/instructlab/instructlab
75+
platforms: linux/amd64
76+
build-args: |
77+
GIT_TAG=stable
78+
push: false
79+
tags: ${{ steps.ilab_meta.outputs.tags }}
80+
labels: ${{ steps.ilab_meta.outputs.labels }}
81+
# cache-from: type=gha
82+
# cache-to: type=gha,mode=max
83+
file: ./training/instructlab/${{ matrix.containerfile_path }}
9384

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 }}
85+
# - name: Build Image
86+
# id: build_image
87+
# working-directory: ./training/instructlab
88+
# run: |
89+
# buildah --version
90+
# buildah bud --platform linux/amd64 \
91+
# -f ${{ matrix.containerfile_path }} \
92+
# --format docker \
93+
# --tls-verify=true \
94+
# -t ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}/instructlab-${{ matrix.make_target}}:latest \
95+
# instructlab/
10196

10297
- name: Publish Job Results to Slack
10398
id: slack

0 commit comments

Comments
 (0)