Skip to content

Commit 3586b59

Browse files
author
matatonic
committed
build a dev image also.
1 parent 18d33c6 commit 3586b59

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

.github/workflows/build-docker.yml

+40-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- 'main'
8+
- 'dev'
89
release:
910
types: [published]
1011

@@ -55,7 +56,7 @@ jobs:
5556
images: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
5657

5758
# Build and push the Docker image to GHCR for the main branch or specific tags
58-
- name: Build and Push Docker Image
59+
- name: Build and Push Docker Image (main, latest)
5960
if: github.ref == 'refs/heads/main'
6061
uses: docker/build-push-action@v4
6162
with:
@@ -66,6 +67,18 @@ jobs:
6667
labels: version=${{ github.run_id }}
6768
platforms: linux/amd64,linux/arm64
6869

70+
# Build and push the Docker image to GHCR for the main branch or specific tags
71+
- name: Build and Push Docker Image (dev)
72+
if: github.ref == 'refs/heads/dev'
73+
uses: docker/build-push-action@v4
74+
with:
75+
context: .
76+
file: Dockerfile
77+
push: true
78+
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:dev
79+
labels: version=${{ github.run_id }}
80+
platforms: linux/amd64,linux/arm64
81+
6982
# For tagged releases, build and push the Docker image with the corresponding tag
7083
- name: Build and Push Docker Image (Tagged)
7184
if: startsWith(github.ref, 'refs/tags/')
@@ -135,6 +148,18 @@ jobs:
135148
labels: version=${{ github.run_id }}
136149
platforms: linux/amd64,linux/arm64
137150

151+
# Build and push the Docker image to GHCR for the main branch or specific tags
152+
- name: Build and Push Docker Image (dev)
153+
if: github.ref == 'refs/heads/dev'
154+
uses: docker/build-push-action@v4
155+
with:
156+
context: .
157+
file: Dockerfile.min
158+
push: true
159+
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:dev
160+
labels: version=${{ github.run_id }}
161+
platforms: linux/amd64,linux/arm64
162+
138163
# For tagged releases, build and push the Docker image with the corresponding tag
139164
- name: Build and Push Docker Image (Tagged)
140165
if: startsWith(github.ref, 'refs/tags/')
@@ -207,6 +232,20 @@ jobs:
207232
build-args: |
208233
USE_ROCM=1
209234
235+
# Build and push the Docker image to GHCR for the main branch or specific tags
236+
- name: Build and Push Docker Image (dev)
237+
if: github.ref == 'refs/heads/dev'
238+
uses: docker/build-push-action@v4
239+
with:
240+
context: .
241+
file: Dockerfile
242+
push: true
243+
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:dev
244+
labels: version=${{ github.run_id }}
245+
platforms: linux/amd64,linux/arm64
246+
build-args: |
247+
USE_ROCM=1
248+
210249
# For tagged releases, build and push the Docker image with the corresponding tag
211250
- name: Build and Push Docker Image (Tagged)
212251
if: startsWith(github.ref, 'refs/tags/')

0 commit comments

Comments
 (0)