forked from Mouws/protonmail-bridge-nextcoud-podman
Fix update check
This commit is contained in:
parent
3ce0700684
commit
5ea2608c8d
4
.github/workflows/update-check.yaml
vendored
4
.github/workflows/update-check.yaml
vendored
@ -13,10 +13,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
ref: master
|
||||
- name: Check Update
|
||||
run: bash check-update.sh
|
||||
run: bash update-check.sh
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
|
||||
|
||||
@ -2,13 +2,19 @@
|
||||
|
||||
set -ex
|
||||
|
||||
REMOTE_REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
||||
|
||||
# Switch to master branch
|
||||
git clone "${REMOTE_REPO}" master
|
||||
cd master
|
||||
|
||||
source ./releaserc
|
||||
|
||||
JSON_CONTENT=$(curl -q https://protonmail.com/download/current_version_linux.json)
|
||||
URL=$(echo ${JSON_CONTENT} | sed -n "s/^.*\"DebFile\":\"\([a-z0-9:/._-]*\)\".*$/\1/p")
|
||||
CURR_RELEASE=$(echo $URL | sed -n "s/https:\/\/protonmail.com\/download\/protonmail-bridge_\([0-9.-]*\)_amd64.deb/\1/p")
|
||||
|
||||
if [[ RELEASE != CURR_RELEASE ]]; then
|
||||
if [[ $RELEASE != $CURR_RELEASE ]]; then
|
||||
echo "New release found: ${CURR_RELEASE}"
|
||||
|
||||
# bump up to new release
|
||||
@ -22,7 +28,6 @@ if [[ RELEASE != CURR_RELEASE ]]; then
|
||||
git tag -a "v${CURR_RELEASE}" -m "Release ${CURR_RELEASE}"
|
||||
|
||||
# push
|
||||
REMOTE_REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
||||
git push "${REMOTE_REPO}" master
|
||||
git push "${REMOTE_REPO}" master --tags
|
||||
|
||||
Loading…
Reference in New Issue
Block a user