fixed add detector button, lists more than 10 detectors (#37) #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a workflow to build images | |
name: Build Docker Images | |
on: [push] | |
jobs: | |
build: | |
name: Build Docker Image | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [frontend, frontend-armv7, backend, backend-armv7] | |
include: | |
- target: frontend | |
platforms: linux/amd64,linux/arm64 | |
dockerfile: ./frontend.Dockerfile | |
tag: docker.io/groundlight/monitoring-notification-server-frontend:latest | |
- target: frontend-armv7 | |
platforms: linux/arm/v7 | |
dockerfile: ./frontend-armv7.Dockerfile | |
tag: docker.io/groundlight/monitoring-notification-server-frontend:armv7-latest | |
- target: backend | |
platforms: linux/amd64,linux/arm64 | |
dockerfile: ./backend.Dockerfile | |
tag: docker.io/groundlight/monitoring-notification-server-backend:latest | |
- target: backend-armv7 | |
platforms: linux/arm/v7 | |
dockerfile: ./backend-armv7.Dockerfile | |
tag: docker.io/groundlight/monitoring-notification-server-backend:armv7-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to container registry | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} | |
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }} | |
registry: docker.io | |
- name: Build Image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
tags: ${{ matrix.tag }} | |
platforms: ${{ matrix.platforms }} | |
file: ${{ matrix.dockerfile }} | |
# push if the target is main | |
push: ${{ github.ref == 'refs/heads/main' }} | |
cache-from: type=gha,scope=${{ matrix.target }} | |
cache-to: type=gha,scope=${{ matrix.target }},mode=max |