Refactor update job to fetch latest Homebrewery release using GitHub API
This commit is contained in:
parent
f9797244ef
commit
4291a6c3ec
@ -17,16 +17,21 @@ jobs:
|
|||||||
update:
|
update:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Get latest homebrewery release
|
- name: Get latest Homebrewery release via GitHub API
|
||||||
id: latest_release
|
id: latest_release
|
||||||
uses: easyware-io/get-latest-release@v1
|
run: |
|
||||||
env:
|
resp=$(curl -sSf \
|
||||||
GITHUB_API_URL: https://api.github.com
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
GITHUB_SERVER_URL: https://github.com
|
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \
|
||||||
with:
|
https://api.github.com/repos/naturalcrit/homebrewery/releases/latest)
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
|
||||||
repo: homebrewery
|
echo "tag_name=$(echo "$resp" | jq -r .tag_name)" >> "$GITHUB_OUTPUT"
|
||||||
owner: naturalcrit
|
echo "name=$(echo "$resp" | jq -r .name)" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "id=$(echo "$resp" | jq -r .id)" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "url=$(echo "$resp" | jq -r .url)" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "body=$(echo "$resp" | jq -r .body)" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "draft=$(echo "$resp" | jq -r .draft)" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "prerelease=$(echo "$resp" | jq -r .prerelease)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Create Docker Release
|
- name: Create Docker Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user