From ab72f160ff48c954154f7fa97f00293e8b1e46dd Mon Sep 17 00:00:00 2001 From: Max Winterstein Date: Sun, 10 Jan 2021 01:23:28 +0100 Subject: [PATCH] Seperate actions and add version tag --- .github/workflows/eufy-ha-mqtt-bridge.yml | 40 +++++++++++++++++++ ...ain.yml => toogoodtogo-ha-mqtt-bridge.yml} | 32 +-------------- 2 files changed, 41 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/eufy-ha-mqtt-bridge.yml rename .github/workflows/{main.yml => toogoodtogo-ha-mqtt-bridge.yml} (58%) diff --git a/.github/workflows/eufy-ha-mqtt-bridge.yml b/.github/workflows/eufy-ha-mqtt-bridge.yml new file mode 100644 index 0000000..f1b2299 --- /dev/null +++ b/.github/workflows/eufy-ha-mqtt-bridge.yml @@ -0,0 +1,40 @@ +name: build-and-push + +on: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + inputs: + version: + description: 'Image Tag' + required: true + +jobs: + eufy-ha-mqtt-bridge: + runs-on: ubuntu-latest + + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Login to DockerHub + 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: eufy-ha-mqtt-bridge/ + file: eufy-ha-mqtt-bridge/Dockerfile-real + platforms: linux/amd64,linux/arm/v7,linux/arm64 + push: true + tags: | + maxwinterstein/homeassistant-addon-eufy-ha-mqtt-bridge:${{ github.event.inputs.tags }} \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/toogoodtogo-ha-mqtt-bridge.yml similarity index 58% rename from .github/workflows/main.yml rename to .github/workflows/toogoodtogo-ha-mqtt-bridge.yml index fe90c9b..3fa75df 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/toogoodtogo-ha-mqtt-bridge.yml @@ -1,4 +1,4 @@ -name: build-and-push +name: toogoodtogo-ha-mqtt-bridge on: # Triggers the workflow on push or pull request events but only for the main branch @@ -42,33 +42,3 @@ jobs: push: true tags: | maxwinterstein/homeassistant-addon-toogoodtogo-ha-mqtt-bridge:latest - - eufy-ha-mqtt-bridge: - runs-on: ubuntu-latest - - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - 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: eufy-ha-mqtt-bridge/ - file: eufy-ha-mqtt-bridge/Dockerfile-real - platforms: linux/amd64,linux/arm/v7,linux/arm64 - push: true - tags: | - maxwinterstein/homeassistant-addon-eufy-ha-mqtt-bridge:latest \ No newline at end of file