Skip to content

Update docker-build.yml #672

Update docker-build.yml

Update docker-build.yml #672

Workflow file for this run

name: Build and Push Docker Images
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
service: [worker-cli]
include:
- service: worker-cli
dockerfile: docker/docker/worker-cli/Dockerfile
context: docker/docker/worker-cli
component: worker-cli
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
platforms: linux/amd64, linux/arm64
push: true
tags: |
sunsolution/betterscan-${{ matrix.component }}:latest
sunsolution/betterscan-${{ matrix.component }}:${{ github.sha }}