Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
589e5d8a0a
|
|||
|
4fb3849d8c
|
|||
|
2fb90b0599
|
|||
|
40ff0e437e
|
|||
|
d09accc295
|
|||
|
34af6e65d2
|
|||
|
cadd22d22b
|
|||
|
a4ed524c9b
|
|||
|
4291a6c3ec
|
|||
|
f9797244ef
|
|||
|
00c78d51d4
|
|||
|
41d0bb47a5
|
|||
|
ea561c9f1b
|
|||
|
3258188bc7
|
|||
|
02a819c9c7
|
@@ -6,32 +6,66 @@ on:
|
|||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: "update-homebrewery"
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
update:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Get latest homebrewery release
|
- name: Get latest Homebrewery release via GitHub API
|
||||||
id: latest_release
|
run: |
|
||||||
uses: kaliber5/action-get-release@v1
|
resp=$(curl -sSf \
|
||||||
with:
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \
|
||||||
repo: homebrewery
|
https://api.github.com/repos/naturalcrit/homebrewery/releases/latest)
|
||||||
owner: naturalcrit
|
|
||||||
latest: true
|
id=$( echo "$resp" | jq -r .id)
|
||||||
draft: false
|
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
|
- name: Create Docker Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
|
if: ${{ env.ID > 0 && env.DRAFT != 'true' }}
|
||||||
with:
|
with:
|
||||||
prerelease: ${{ steps.latest_release.prerelease }}
|
token: ${{ secrets.GT_UPDATE_TOKEN }}
|
||||||
name: ${{ steps.latest_release.name }}
|
prerelease: ${{ env.PRERELEASE }}
|
||||||
tag_name: ${{ steps.latest_release.tag_name }}
|
name: ${{ env.NAME }}
|
||||||
body: |
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
# Homebrewery ${{ steps.latest_release.name }} Image
|
body: ${{ env.RELEASE_BODY }}
|
||||||
|
|
||||||
_This is an automated Docker Image update. Nothing other than the Homebrewery version changed._
|
|
||||||
|
|
||||||
See original Changelog from [${{ steps.latest_release.name }}](${{ steps.latest_release.url }})
|
|
||||||
|
|||||||
Reference in New Issue
Block a user