Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
589e5d8a0a
|
|||
|
4fb3849d8c
|
|||
|
2fb90b0599
|
|||
|
40ff0e437e
|
|||
|
d09accc295
|
|||
|
34af6e65d2
|
|||
|
cadd22d22b
|
|||
|
a4ed524c9b
|
|||
|
4291a6c3ec
|
|||
|
f9797244ef
|
|||
|
00c78d51d4
|
|||
|
41d0bb47a5
|
|||
|
ea561c9f1b
|
|||
|
3258188bc7
|
|||
|
02a819c9c7
|
|||
|
53b3ad7276
|
71
.gitea/workflows/update.yaml
Normal file
71
.gitea/workflows/update.yaml
Normal 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 }}
|
||||
Reference in New Issue
Block a user