Create main.yml

This commit is contained in:
lolouk44 2020-11-23 19:05:51 +00:00 committed by GitHub
parent a3c429ff68
commit df770e2859
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

31
.github/workflows/main.yml vendored Normal file
View file

@ -0,0 +1,31 @@
name: Publish Docker image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build image
run: |
docker buildx build --no-cache --push \
--tag lolouk44/xiaomi-mi-scale:${{ github.event.release.tag_name }} \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8 .