Refactor update job to streamline release body construction and improve readability

This commit is contained in:
Florian Weber 2025-06-26 16:15:31 +02:00
parent d09accc295
commit 40ff0e437e
Signed by: f.weber
GPG Key ID: A1C85EB19014A2D3

View File

@ -19,7 +19,6 @@ jobs:
steps: steps:
- name: Get latest Homebrewery release via GitHub API - name: Get latest Homebrewery release via GitHub API
run: | run: |
# 1) API-Call
resp=$(curl -sSf \ resp=$(curl -sSf \
-H "Accept: application/vnd.github.v3+json" \ -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \ -H "Authorization: token ${{ secrets.GH_TOKEN }}" \
@ -40,19 +39,17 @@ jobs:
echo "DRAFT=$draft" >>"$GITHUB_ENV" echo "DRAFT=$draft" >>"$GITHUB_ENV"
echo "PRERELEASE=$prerelease" >>"$GITHUB_ENV" echo "PRERELEASE=$prerelease" >>"$GITHUB_ENV"
read -r -d '' RELEASE_BODY <<EOF {
# Homebrewery $name Image echo "RELEASE_BODY<<EOF"
printf '%s\n' "# Homebrewery $name Image"
> _This is an automated Docker Image update. Nothing other than the Homebrewery version changed._ printf '\n'
printf '%s\n' "> _This is an automated Docker Image update. Nothing other than the Homebrewery version changed._"
$body_text printf '\n'
printf '%s\n' "$body_text"
See original Changelog from [$name]($url) printf '\n'
EOF printf '%s\n' "See original Changelog from [$name]($html_url)"
echo "EOF"
echo "RELEASE_BODY<<EOF" >>"$GITHUB_ENV" } >>"$GITHUB_ENV"
printf '%s\n' "$RELEASE_BODY" >>"$GITHUB_ENV"
echo "EOF" >>"$GITHUB_ENV"
- name: Debug step - name: Debug step
run: | run: |