diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc63551c9..9f6fde442 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -118,6 +118,23 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + + - name: Get tags + run: git fetch --force --tags origin + + - name: Get openDTU core release + run: | + echo "OPEN_DTU_CORE_RELEASE=$(git show-ref | grep 'refs/tags/v' | tail -1 | sed 's#.*/##')" >> $GITHUB_ENV + + - name: Create openDTU-core-release-Badge + uses: schneegans/dynamic-badges-action@v1.6.0 + with: + auth: ${{ secrets.GIST_SECRET }} + gistID: 68b47cc8c8994d04ab3a4fa9d8aee5e6 + filename: openDTUcoreRelease.json + label: based on original OpenDTU + message: ${{ env.OPEN_DTU_CORE_RELEASE }} + color: lightblue - name: Build Changelog id: github_release diff --git a/README.md b/README.md index 5bc46116b..0f58e65ea 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This is a fork from the Hoymiles project OpenDTU. -![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/helgeerbe/OpenDTU?label=based%20on%20original%20OpenDTU) +![GitHub tag (latest SemVer)](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/helgeerbe/68b47cc8c8994d04ab3a4fa9d8aee5e6/raw/openDTUcoreRelease.json) This README is kept similar to the openDTU project for process reasons. diff --git a/README_onBattery.md b/README_onBattery.md index 4593bcfd8..a1161537a 100644 --- a/README_onBattery.md +++ b/README_onBattery.md @@ -2,7 +2,7 @@ This is a fork from the Hoymiles project [OpenDTU](https://github.com/tbnobody/OpenDTU). This project is still under development but is being used on a day to day basis as well. -![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/helgeerbe/OpenDTU?label=based%20on%20original%20OpenDTU) +![GitHub tag (latest SemVer)](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/helgeerbe/68b47cc8c8994d04ab3a4fa9d8aee5e6/raw/openDTUcoreRelease.json) ## Features