Skip to content

Commit

Permalink
Fix: 'create release badge' action and show it
Browse files Browse the repository at this point in the history
GIST_SECRET and the gist are living on my personal account as its not possible to have a gist on organisation level
  • Loading branch information
AndreasBoehm committed Jan 16, 2025
1 parent a92a7ba commit 8600c26
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,25 +141,22 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Get tags
run: git fetch --force --tags origin
- name: Get openDTU core tags
run: git fetch --force --tags https://github.com/tbnobody/OpenDTU.git

- name: Get openDTU core release
run: |
echo "OPEN_DTU_CORE_RELEASE=$(git for-each-ref --sort=creatordate --format '%(refname) %(creatordate)' refs/tags | grep 'refs/tags/v' | tail -1 | sed 's#.*/##' | sed 's/ .*//')" >> $GITHUB_ENV
# disabled as uploading the changed gist failed repeatedly.
# maybe the token in secrets.GIST_SECRET has expired?
# need help from repo owner @helgeerbe to fix this.
# - name: Create openDTU-core-release-Badge
# uses: schneegans/[email protected]
# with:
# auth: ${{ secrets.GIST_SECRET }}
# gistID: 68b47cc8c8994d04ab3a4fa9d8aee5e6
# filename: openDTUcoreRelease.json
# label: based on original OpenDTU
# message: ${{ env.OPEN_DTU_CORE_RELEASE }}
# color: lightblue
- name: Create openDTU-core-release-Badge
uses: schneegans/dynamic-badges-action@e9a478b16159b4d31420099ba146cdc50f134483 # version 1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 856dda48c1cadac6ea495213340c612b
filename: openDTUcoreRelease.json
label: based on upstream OpenDTU
message: ${{ env.OPEN_DTU_CORE_RELEASE }}
color: lightblue

- name: Build Changelog
id: github_release
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
[![OpenDTU-OnBattery Build](https://github.com/hoylabs/OpenDTU-OnBattery/actions/workflows/build.yml/badge.svg)](https://github.com/hoylabs/OpenDTU-OnBattery/actions/workflows/build.yml)
[![cpplint](https://github.com/hoylabs/OpenDTU-OnBattery/actions/workflows/cpplint.yml/badge.svg)](https://github.com/hoylabs/OpenDTU-OnBattery/actions/workflows/cpplint.yml)
[![Yarn Linting](https://github.com/hoylabs/OpenDTU-OnBattery/actions/workflows/yarnlint.yml/badge.svg)](https://github.com/hoylabs/OpenDTU-OnBattery/actions/workflows/yarnlint.yml)
<!---
disabled while "create release badge" action is broken, see .github/build.yml
![GitHub tag (latest SemVer)](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/helgeerbe/68b47cc8c8994d04ab3a4fa9d8aee5e6/raw/openDTUcoreRelease.json)
--->
![GitHub tag (latest SemVer)](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/AndreasBoehm/856dda48c1cadac6ea495213340c612b/raw/openDTUcoreRelease.json)

- [OpenDTU-OnBattery](#opendtu-onbattery)
- [Getting Started](#getting-started)
Expand Down

0 comments on commit 8600c26

Please sign in to comment.