Remove hard coded repo

Signed-off-by: sumarsono <sumarsono.wongbandar@gmail.com>
This commit is contained in:
sumarsono 2024-07-16 15:36:24 +07:00 committed by GitHub
parent 8ac2964c98
commit 644c394d28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,9 +17,8 @@ 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" --repo "$repo"; then
if gh release view "$latestVersion" --repo "$GITHUB_REPOSITORY"; then
echo "VaultWarden Binary: Version already exists"
exit 0
fi
@ -35,6 +34,6 @@ jobs:
docker rm -v "$id"
tar -cvf vaultwarden-"$arch2".tar.gz "$arch2/vaultwarden" "$arch2/web-vault"
done
gh release create "$latestVersion" --repo "$repo" --notes "Update to [$latestVersion](https://github.com/dani-garcia/vaultwarden/releases/tag/$latestVersion)" *.tar.gz
gh release create "$latestVersion" --repo "$GITHUB_REPOSITORY" --notes "Update to [$latestVersion](https://github.com/dani-garcia/vaultwarden/releases/tag/$latestVersion)" *.tar.gz
env:
GH_TOKEN: ${{ github.token }}