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:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Get latest homebrewery release
|
||||
- name: Get latest Homebrewery release via GitHub API
|
||||
id: latest_release
|
||||
uses: easyware-io/get-latest-release@v1
|
||||
env:
|
||||
GITHUB_API_URL: https://api.github.com
|
||||
GITHUB_SERVER_URL: https://github.com
|
||||
with:
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
repo: homebrewery
|
||||
owner: naturalcrit
|
||||
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)
|
||||
|
||||
echo "tag_name=$(echo "$resp" | jq -r .tag_name)" >> "$GITHUB_OUTPUT"
|
||||
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
|
||||
uses: softprops/action-gh-release@v2
|
||||
|
Loading…
x
Reference in New Issue
Block a user