Skip to content

Commit

Permalink
build a dev image also.
Browse files Browse the repository at this point in the history
  • Loading branch information
matatonic committed Aug 22, 2024
1 parent 18d33c6 commit 3586b59
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- 'main'
- 'dev'
release:
types: [published]

Expand Down Expand Up @@ -55,7 +56,7 @@ jobs:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}

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

# Build and push the Docker image to GHCR for the main branch or specific tags
- name: Build and Push Docker Image (dev)
if: github.ref == 'refs/heads/dev'
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
push: true
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:dev
labels: version=${{ github.run_id }}
platforms: linux/amd64,linux/arm64

# For tagged releases, build and push the Docker image with the corresponding tag
- name: Build and Push Docker Image (Tagged)
if: startsWith(github.ref, 'refs/tags/')
Expand Down Expand Up @@ -135,6 +148,18 @@ jobs:
labels: version=${{ github.run_id }}
platforms: linux/amd64,linux/arm64

# Build and push the Docker image to GHCR for the main branch or specific tags
- name: Build and Push Docker Image (dev)
if: github.ref == 'refs/heads/dev'
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.min
push: true
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:dev
labels: version=${{ github.run_id }}
platforms: linux/amd64,linux/arm64

# For tagged releases, build and push the Docker image with the corresponding tag
- name: Build and Push Docker Image (Tagged)
if: startsWith(github.ref, 'refs/tags/')
Expand Down Expand Up @@ -207,6 +232,20 @@ jobs:
build-args: |
USE_ROCM=1
# Build and push the Docker image to GHCR for the main branch or specific tags
- name: Build and Push Docker Image (dev)
if: github.ref == 'refs/heads/dev'
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
push: true
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:dev
labels: version=${{ github.run_id }}
platforms: linux/amd64,linux/arm64
build-args: |
USE_ROCM=1
# For tagged releases, build and push the Docker image with the corresponding tag
- name: Build and Push Docker Image (Tagged)
if: startsWith(github.ref, 'refs/tags/')
Expand Down

0 comments on commit 3586b59

Please sign in to comment.