2020-11-24 06:37:56 +08:00
|
|
|
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 \
|
2020-11-24 07:02:20 +08:00
|
|
|
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8 ./mi-scale/Dockerfile
|