4
4
schedule : # schedule the job to run at 12 AM daily
5
5
- cron : ' 0 0 * * *'
6
6
7
- # pull_request:
8
- # branches:
9
- # - main
10
- # paths:
11
- # - .github/workflows/instructlab_baseimages_build_push .yaml
12
- # - training/nvidia
7
+ pull_request :
8
+ branches :
9
+ - main
10
+ paths :
11
+ - .github/workflows/instructlab .yaml
12
+ - training/instructlab/Makefile
13
13
# push:
14
14
# branches:
15
15
# - main
16
16
# paths:
17
- # - .github/workflows/instructlab_baseimages_build_push .yaml
18
- # - training/nvidia
17
+ # - .github/workflows/instructlab .yaml
18
+ # - training/instructlab/Makefile
19
19
20
20
workflow_dispatch :
21
21
28
28
REGISTRY_ORG : containers
29
29
30
30
jobs :
31
- instructlab-nvidia :
32
- if : " !contains(github.event.pull_request.labels.*.name, 'hold-tests') && github.repository == 'containers-mirror/ai-lab-recipes'"
31
+ instructlab-image-builds :
32
+ # if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests') && github.repository == 'containers-mirror/ai-lab-recipes'"
33
+ if : " !contains(github.event.pull_request.labels.*.name, 'hold-tests')"
33
34
strategy :
34
35
matrix :
35
36
include :
36
- - make_target : nvidia
37
+ # - make_target: nvidia
38
+ # containerfile_path: training/instructlab/instructlab/containers/cuda/Containerfile
37
39
- make_target : amd
40
+ containerfile_path : training/instructlab/instructlab/containers/rocm/Containerfile
41
+ - make_target : intel
42
+ containerfile_path : training/instructlab/instructlab/containers/hpu/Containerfile
38
43
runs-on : ubuntu-latest
39
44
# runs-on: ubuntu-22.04-2core # starting with minimal option
40
45
steps :
@@ -45,10 +50,19 @@ jobs:
45
50
46
51
47
52
53
+ - name : Make Instructlab
54
+ run : make instructlab
55
+ working-directory : ./training/instructlab
56
+
48
57
- name : Build Image
49
58
id : build_image
50
- run : make ${{ matrix.make_target}}
51
- working-directory : ./training/instructlab
59
+ uses : redhat-actions/buildah-build@v2
60
+ with :
61
+ image : ${{ env.REGISTRY }}/${{ env.REGISTRY_ORG }}/instructlab-${{ matrix.make_target }}
62
+ tags : latest ${{ github.sha }}
63
+ platforms : linux/amd64
64
+ containerfiles : ${{ matrix.containerfile_path }}
65
+ context : training/instructlab/instructlab/
52
66
53
67
- name : Login to Container Registry
54
68
if : github.event_name == 'push' && github.ref == 'refs/heads/main'
0 commit comments