Add github action to build multi-arch and push to dockerhub
This commit is contained in:
parent
45584f2336
commit
160bd3b46f
28
.github/workflows/build.yaml
vendored
Normal file
28
.github/workflows/build.yaml
vendored
Normal 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
|
Loading…
Reference in New Issue
Block a user