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 - name: Update
run: | run: |
#!/bin/bash #!/bin/bash
repo="1f349/vaultwarden-binary"
latestVersion="$(curl -q --fail 'https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest' | jq -r '.tag_name' -)" 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 exit 0
fi fi
docker pull --platform linux/amd64 vaultwarden/server:"$latestVersion" docker pull --platform linux/amd64 vaultwarden/server:"$latestVersion"
@ -26,6 +27,6 @@ jobs:
docker cp "$id":/web-vault web-vault docker cp "$id":/web-vault web-vault
docker rm -v "$id" docker rm -v "$id"
tar -cvf vaultwarden.tar.gz vaultwarden web-vault 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: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}