Specify repo for release checking

This commit is contained in:
Melon 2024-05-13 22:49:45 +01:00
parent 1d4cdca099
commit 1b7447312d
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -16,8 +16,9 @@ jobs:
- name: Update
run: |
#!/bin/bash
repo="1f349/vaultwarden-binary"
latestVersion="$(curl -q --fail 'https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest' | jq -r '.tag_name' -)"
if gh release view "$latestVersion"; then
if gh release view "$latestVersion" --repo "$repo"; then
exit 0
fi
docker pull --platform linux/amd64 vaultwarden/server:"$latestVersion"
@ -26,6 +27,6 @@ jobs:
docker cp "$id":/web-vault web-vault
docker rm -v "$id"
tar -cvf vaultwarden.tar.gz vaultwarden web-vault
gh release create "v$latestVersion" --repo 1f349/vaultwarden-binary --notes "Update to [$latestVersion](https://github.com/dani-garcia/vaultwarden/releases/tag/$latestVersion" vaultwarden.tar.gz
gh release create "v$latestVersion" --repo "$repo" --notes "Update to [$latestVersion](https://github.com/dani-garcia/vaultwarden/releases/tag/$latestVersion" vaultwarden.tar.gz
env:
GH_TOKEN: ${{ github.token }}