Add github action to build multi-arch and push to dockerhub

This commit is contained in:
selexin 2022-05-13 23:27:31 +10:00
parent 45584f2336
commit 160bd3b46f
No known key found for this signature in database
GPG Key ID: 8C5633201B25C57D

28
.github/workflows/build.yaml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Multi-arch Build and Deploy to Dockerhub
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Check out code
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64/v8
push: true
tags: selexin/face-detect-mqtt:latest