Skip to content

Commit

Permalink
Separate build and triggers for platform archs
Browse files Browse the repository at this point in the history
  • Loading branch information
nagstler committed Apr 28, 2024
1 parent 4b4d044 commit fbd2303
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 4 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ui-docker-build-amd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: frontend-docker-build (AMD)

on:
workflow_run:
workflows: ["frontend-ci"]
branches: [main]
types:
- completed

env:
IMAGE_NAME: multiwoven/multiwoven-ui
IMAGE_TAG: edge

jobs:
build_and_push:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push Docker image
uses: docker/build-push-action@v2
with:
context: ./ui
file: ./ui/Dockerfile
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
${{ env.IMAGE_NAME }}:${{ github.sha }}
platforms: linux/amd64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: frontend-docker-build
name: frontend-docker-build (ARM64)

on:
workflow_run:
Expand Down Expand Up @@ -40,4 +40,4 @@ jobs:
tags: |
${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
${{ env.IMAGE_NAME }}:${{ github.sha }}
platforms: linux/amd64,linux/arm64
platforms: linux/arm64
43 changes: 43 additions & 0 deletions .github/workflows/ui-docker-hub-push-tags-amd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and push Multiwoven UI docker image to Docker Hub (AMD)

on:
workflow_dispatch:
push:
tags:
- v*

jobs:
docker-hub-push-on-merge:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
multiwoven/multiwoven-ui
- name: Build and push UI Docker image
uses: docker/build-push-action@v5
with:
context: ./ui
file: ./ui/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and push Multiwoven UI docker image to Docker Hub
name: Build and push Multiwoven UI docker image to Docker Hub (ARM64)

on:
workflow_dispatch:
Expand Down Expand Up @@ -40,4 +40,4 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
platforms: linux/arm64

0 comments on commit fbd2303

Please sign in to comment.