name: toogoodtogo-ha-mqtt-bridge

on:
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:
    inputs:
      version:
        description: "Image Tag"
        required: true

jobs:
  toogoodtogo-ha-mqtt-bridge:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      - name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      - name: Build and push
        uses: home-assistant/builder@master
        with:
          args: |
            --all \
            --target toogoodtogo-ha-mqtt-bridge \
            --docker-hub maxwinterstein --version ${{ github.event.inputs.version }}
