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 - 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" --repo "$repo"; then if gh release view "$latestVersion" --repo "$GITHUB_REPOSITORY"; then
echo "VaultWarden Binary: Version already exists" echo "VaultWarden Binary: Version already exists"
exit 0 exit 0
fi fi
@ -35,6 +34,6 @@ jobs:
docker rm -v "$id" docker rm -v "$id"
tar -cvf vaultwarden-"$arch2".tar.gz "$arch2/vaultwarden" "$arch2/web-vault" tar -cvf vaultwarden-"$arch2".tar.gz "$arch2/vaultwarden" "$arch2/web-vault"
done 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: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}