mirror of
https://github.com/mtan93/homeassistant-addons.git
synced 2026-03-08 05:21:51 +00:00
Update github actions and add version-updater script
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
name: eufy-ha-mqtt-bridge-release-trigger
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
types: [createMR]
|
||||
jobs:
|
||||
createMR:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: 'sed -i "s|\"version\": \".*$|\"version\": \"${{ github.event.client_payload.version }}\",|" eufy-ha-mqtt-bridge/config.json'
|
||||
- run: 'sed -i "s|VERSION=.*$|VERSION=${{ github.event.client_payload.version }}|" eufy-ha-mqtt-bridge/Dockerfile-real'
|
||||
- run: sed -i "2 a $(head -n3 eufy-ha-mqtt-bridge/CHANGELOG.md | tail -n1 | perl -pe 's/(\d+\.)(\d+)(.*)/$1.($2+1).".0]"/e') - $(date +%Y-%m-%d)" eufy-ha-mqtt-bridge/CHANGELOG.md
|
||||
- run: sed -i "3 a - Update \`eufy-ha-mqtt-bridge\` to \`${{ github.event.client_payload.version }}\` [Changelog](https://github.com/matijse/eufy-ha-mqtt-bridge/releases)\n" eufy-ha-mqtt-bridge/CHANGELOG.md
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
title: Update eufy-mqtt-ha-bridge to version ${{ github.event.client_payload.version }}
|
||||
53
.github/workflows/eufy_create_mr_and_build_image.yaml
vendored
Normal file
53
.github/workflows/eufy_create_mr_and_build_image.yaml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: eufy_create_mr_and_build_image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
create_mr_and_build_image:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: cd eufy-ha-mqtt-bridge && ./version-updater.sh
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
title: Update eufy-mqtt-ha-bridge to version ${{ env.MQTT_BRIDGE_VERSION }}
|
||||
commit-message: Update eufy-mqtt-ha-bridge to version ${{ env.MQTT_BRIDGE_VERSION }}
|
||||
committer: Max Winterstein <MaxWinterstein@users.noreply.github.com>
|
||||
author: Max Winterstein <MaxWinterstein@users.noreply.github.com>
|
||||
assignees: MaxWinterstein
|
||||
body: |
|
||||
Update report
|
||||
- Update related files of eufy-mqtt-ha-bridge to version ${{ env.MQTT_BRIDGE_VERSION }} [Changelog][1]
|
||||
- Build docker image, check [DockerHub][2]
|
||||
|
||||
[1]: https://github.com/matijse/eufy-ha-mqtt-bridge/releases
|
||||
[2]: https://hub.docker.com/r/maxwinterstein/homeassistant-addon-eufy-ha-mqtt-bridge
|
||||
if: ${{ env.CONTINUE }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
if: ${{ env.CONTINUE }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
if: ${{ env.CONTINUE }}
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
if: ${{ env.CONTINUE }}
|
||||
|
||||
- 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:${{ env.ADDON_NEXT_VERSION }}
|
||||
if: ${{ env.CONTINUE }}
|
||||
@@ -1,4 +1,4 @@
|
||||
name: eufy-ha-mqtt-bridge
|
||||
name: eufy_manually_build_image
|
||||
|
||||
on:
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
Reference in New Issue
Block a user