|
1 | | -name: Build Images |
| 1 | +name: Build Docker Images |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | branches: [main] |
6 | | - tags: ["v*"] |
| 6 | + paths: |
| 7 | + - "operator/**" |
| 8 | + - "key-manager/**" |
| 9 | + - "frontend/**" |
| 10 | + - "model-downloader/**" |
| 11 | + - ".github/workflows/build-images.yaml" |
| 12 | + # The release workflow pins images to sha-<release-commit>, so the |
| 13 | + # release commit (a Chart.yaml bump) must produce images with that |
| 14 | + # sha. Building here on the bump ensures they exist. This runs in |
| 15 | + # parallel with the release workflow (no hard gate in v1), so images |
| 16 | + # are published around the same time the chart becomes consumable. |
| 17 | + - "charts/nebari-llm-serving/Chart.yaml" |
| 18 | + pull_request: |
| 19 | + paths: |
| 20 | + - "operator/**" |
| 21 | + - "key-manager/**" |
| 22 | + - "frontend/**" |
| 23 | + - "model-downloader/**" |
7 | 24 | workflow_dispatch: |
8 | 25 |
|
9 | | -env: |
10 | | - REGISTRY: ghcr.io |
11 | | - IMAGE_PREFIX: ghcr.io/nebari-dev/nebari-llm-serving-pack |
12 | | - |
13 | 26 | jobs: |
14 | | - build-operator: |
15 | | - name: Build and push operator image |
16 | | - runs-on: ubuntu-latest |
17 | | - permissions: |
18 | | - contents: read |
19 | | - packages: write |
20 | | - steps: |
21 | | - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
22 | | - |
23 | | - - name: Log in to GHCR |
24 | | - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 |
25 | | - with: |
26 | | - registry: ${{ env.REGISTRY }} |
27 | | - username: ${{ github.actor }} |
28 | | - password: ${{ secrets.GITHUB_TOKEN }} |
29 | | - |
30 | | - - name: Extract metadata |
31 | | - id: meta |
32 | | - uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0 |
33 | | - with: |
34 | | - images: ${{ env.IMAGE_PREFIX }}/operator |
35 | | - tags: | |
36 | | - type=sha |
37 | | - type=ref,event=branch |
38 | | - type=semver,pattern=v{{version}} |
39 | | - type=raw,value=latest,enable={{is_default_branch}} |
40 | | -
|
41 | | - - name: Build and push operator image |
42 | | - uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0 |
43 | | - with: |
44 | | - context: operator/ |
45 | | - file: operator/Dockerfile |
46 | | - push: true |
47 | | - tags: ${{ steps.meta.outputs.tags }} |
48 | | - labels: ${{ steps.meta.outputs.labels }} |
49 | | - |
50 | | - build-model-downloader: |
51 | | - name: Build and push model-downloader image |
52 | | - runs-on: ubuntu-latest |
53 | | - permissions: |
54 | | - contents: read |
55 | | - packages: write |
56 | | - steps: |
57 | | - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
58 | | - |
59 | | - - name: Log in to GHCR |
60 | | - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 |
61 | | - with: |
62 | | - registry: ${{ env.REGISTRY }} |
63 | | - username: ${{ github.actor }} |
64 | | - password: ${{ secrets.GITHUB_TOKEN }} |
65 | | - |
66 | | - - name: Extract metadata |
67 | | - id: meta |
68 | | - uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0 |
69 | | - with: |
70 | | - images: ${{ env.IMAGE_PREFIX }}/model-downloader |
71 | | - tags: | |
72 | | - type=sha |
73 | | - type=ref,event=branch |
74 | | - type=semver,pattern=v{{version}} |
75 | | - type=raw,value=latest,enable={{is_default_branch}} |
76 | | -
|
77 | | - - name: Build and push model-downloader image |
78 | | - uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0 |
79 | | - with: |
80 | | - context: model-downloader/ |
81 | | - file: model-downloader/Dockerfile |
82 | | - push: true |
83 | | - tags: ${{ steps.meta.outputs.tags }} |
84 | | - labels: ${{ steps.meta.outputs.labels }} |
85 | | - |
86 | | - build-key-manager: |
87 | | - name: Build and push key-manager image |
88 | | - runs-on: ubuntu-latest |
89 | | - permissions: |
90 | | - contents: read |
91 | | - packages: write |
92 | | - steps: |
93 | | - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
94 | | - |
95 | | - - name: Log in to GHCR |
96 | | - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 |
97 | | - with: |
98 | | - registry: ${{ env.REGISTRY }} |
99 | | - username: ${{ github.actor }} |
100 | | - password: ${{ secrets.GITHUB_TOKEN }} |
101 | | - |
102 | | - - name: Extract metadata |
103 | | - id: meta |
104 | | - uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0 |
105 | | - with: |
106 | | - images: ${{ env.IMAGE_PREFIX }}/key-manager |
107 | | - tags: | |
108 | | - type=sha |
109 | | - type=ref,event=branch |
110 | | - type=semver,pattern=v{{version}} |
111 | | - type=raw,value=latest,enable={{is_default_branch}} |
112 | | -
|
113 | | - - name: Build and push key-manager image |
114 | | - uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0 |
115 | | - with: |
116 | | - context: . |
117 | | - file: key-manager/Dockerfile |
118 | | - push: true |
119 | | - tags: ${{ steps.meta.outputs.tags }} |
120 | | - labels: ${{ steps.meta.outputs.labels }} |
121 | | - |
122 | | - build-frontend: |
123 | | - name: Build and push frontend image |
124 | | - runs-on: ubuntu-latest |
125 | | - permissions: |
126 | | - contents: read |
127 | | - packages: write |
128 | | - steps: |
129 | | - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
130 | | - |
131 | | - - name: Log in to GHCR |
132 | | - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 |
133 | | - with: |
134 | | - registry: ${{ env.REGISTRY }} |
135 | | - username: ${{ github.actor }} |
136 | | - password: ${{ secrets.GITHUB_TOKEN }} |
137 | | - |
138 | | - - name: Extract metadata |
139 | | - id: meta |
140 | | - uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0 |
141 | | - with: |
142 | | - images: ${{ env.IMAGE_PREFIX }}/frontend |
143 | | - tags: | |
144 | | - type=sha |
145 | | - type=ref,event=branch |
146 | | - type=semver,pattern=v{{version}} |
147 | | - type=raw,value=latest,enable={{is_default_branch}} |
148 | | -
|
149 | | - - name: Build and push frontend image |
150 | | - uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0 |
151 | | - with: |
152 | | - context: frontend/ |
153 | | - file: frontend/Dockerfile |
154 | | - push: true |
155 | | - tags: ${{ steps.meta.outputs.tags }} |
156 | | - labels: ${{ steps.meta.outputs.labels }} |
| 27 | + operator: |
| 28 | + uses: nebari-dev/.github/.github/workflows/pack-build-image.yaml@v1 |
| 29 | + with: |
| 30 | + image: operator |
| 31 | + context: operator/ |
| 32 | + push: ${{ github.event_name != 'pull_request' }} |
| 33 | + secrets: |
| 34 | + QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} |
| 35 | + |
| 36 | + model-downloader: |
| 37 | + uses: nebari-dev/.github/.github/workflows/pack-build-image.yaml@v1 |
| 38 | + with: |
| 39 | + image: model-downloader |
| 40 | + context: model-downloader/ |
| 41 | + push: ${{ github.event_name != 'pull_request' }} |
| 42 | + secrets: |
| 43 | + QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} |
| 44 | + |
| 45 | + key-manager: |
| 46 | + uses: nebari-dev/.github/.github/workflows/pack-build-image.yaml@v1 |
| 47 | + with: |
| 48 | + image: key-manager |
| 49 | + context: "." |
| 50 | + dockerfile: key-manager/Dockerfile |
| 51 | + push: ${{ github.event_name != 'pull_request' }} |
| 52 | + secrets: |
| 53 | + QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} |
| 54 | + |
| 55 | + frontend: |
| 56 | + uses: nebari-dev/.github/.github/workflows/pack-build-image.yaml@v1 |
| 57 | + with: |
| 58 | + image: frontend |
| 59 | + context: frontend/ |
| 60 | + push: ${{ github.event_name != 'pull_request' }} |
| 61 | + secrets: |
| 62 | + QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }} |
0 commit comments