16 Commits

Author SHA1 Message Date
589e5d8a0a Update build workflow to trigger on release events and adjust update job to include token
All checks were successful
Building and publishing Homebrewery as Docker Image / build (release) Successful in 11m39s
2025-06-26 16:35:02 +02:00
4fb3849d8c Change trigger from release event to push event for versioned tags in build workflow 2025-06-26 16:23:35 +02:00
2fb90b0599 Change release event type from 'published' to 'created' in build workflow 2025-06-26 16:21:49 +02:00
40ff0e437e Refactor update job to streamline release body construction and improve readability 2025-06-26 16:15:31 +02:00
d09accc295 Refactor update job to construct release body directly in environment variable and simplify body handling 2025-06-26 16:12:55 +02:00
34af6e65d2 Refactor update job to store release data in environment variables and simplify debug step 2025-06-26 16:07:23 +02:00
cadd22d22b Added debugging step 2025-06-26 15:57:15 +02:00
a4ed524c9b Fix body output handling in update job for Docker release 2025-06-26 15:54:33 +02:00
4291a6c3ec Refactor update job to fetch latest Homebrewery release using GitHub API 2025-06-26 15:51:04 +02:00
f9797244ef Refactor Actions workflow to remove debug settings and fixing api url problems 2025-06-26 15:35:04 +02:00
00c78d51d4 Update proxy settings in Actions workflow to use internal IP addresses 2025-06-26 15:02:32 +02:00
41d0bb47a5 Add HTTPS_PROXY environment variable and refine condition for Docker release step in Actions workflow 2025-06-26 14:53:37 +02:00
ea561c9f1b Add DEBUG environment variable to update job in Actions workflow 2025-06-26 14:14:22 +02:00
3258188bc7 Update Actions workflow to use easyware-io/get-latest-release 2025-06-26 14:04:29 +02:00
02a819c9c7 Update Actions workflow to improve concurrency and specify Ubuntu version 2025-06-26 13:52:09 +02:00
53b3ad7276 Add Actions workflow for automated Homebrewery release updates
All checks were successful
Building and publishing Homebrewery as Docker Image / build (release) Successful in 11m31s
2025-06-26 12:32:56 +02:00

View File

@@ -0,0 +1,71 @@
name: Updating to latest Homebrewery Release
on:
schedule:
- cron: '0 9,17 * * *'
workflow_dispatch:
concurrency:
group: "update-homebrewery"
cancel-in-progress: true
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-24.04
steps:
- name: Get latest Homebrewery release via GitHub API
run: |
resp=$(curl -sSf \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \
https://api.github.com/repos/naturalcrit/homebrewery/releases/latest)
id=$( echo "$resp" | jq -r .id)
tag_name=$( echo "$resp" | jq -r .tag_name)
name=$( echo "$resp" | jq -r .name)
url=$( echo "$resp" | jq -r .url)
draft=$( echo "$resp" | jq -r .draft)
prerelease=$( echo "$resp" | jq -r .prerelease)
body_text=$( echo "$resp" | jq -r .body)
echo "ID=$id" >>"$GITHUB_ENV"
echo "TAG_NAME=$tag_name" >>"$GITHUB_ENV"
echo "NAME=$name" >>"$GITHUB_ENV"
echo "URL=$url" >>"$GITHUB_ENV"
echo "DRAFT=$draft" >>"$GITHUB_ENV"
echo "PRERELEASE=$prerelease" >>"$GITHUB_ENV"
{
echo "RELEASE_BODY<<EOF"
printf '%s\n' "# Homebrewery $name Image"
printf '\n'
printf '%s\n' "> _This is an automated Docker Image update. Nothing other than the Homebrewery version changed._"
printf '\n'
printf '%s\n' "$body_text"
printf '\n'
printf '%s\n' "See original Changelog from [$name]($html_url)"
echo "EOF"
} >>"$GITHUB_ENV"
- name: Debug step
run: |
echo "id: $ID"
echo "draft: $DRAFT"
echo "tag_name: $TAG_NAME"
echo "name: $NAME"
echo "url: $URL"
echo "prerelease: $PRERELEASE"
- name: Create Docker Release
uses: softprops/action-gh-release@v2
if: ${{ env.ID > 0 && env.DRAFT != 'true' }}
with:
token: ${{ secrets.GT_UPDATE_TOKEN }}
prerelease: ${{ env.PRERELEASE }}
name: ${{ env.NAME }}
tag_name: ${{ env.TAG_NAME }}
body: ${{ env.RELEASE_BODY }}