hassio-addons/.github/workflows/main.yml
2020-11-23 23:26:37 +00:00

37 lines
1.1 KiB
YAML

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-ha-add-on:${{ github.event.release.tag_name }} \
--tag lolouk44/xiaomi-mi-scale-ha-add-on:latest \
--file ./mi-scale/Dockerfile \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8 .
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}