From f2f2b32841a2c20310e39e9c73cbd68e7cb85e42 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 12 Jan 2024 09:40:29 +0100 Subject: [PATCH] Redirect github api https: //github.com/alexbelgium/hassio-addons/issues/1172 Co-Authored-By: Renat Gabdulhakov --- .github/workflows/on_issues.yml | 12 ++++++------ joal/Dockerfile | 2 +- joal/rootfs/etc/cont-init.d/99-run.sh | 4 ++-- transmission/rootfs/etc/cont-init.d/90-customUI.sh | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/on_issues.yml b/.github/workflows/on_issues.yml index bdfff5f2f..76de95549 100644 --- a/.github/workflows/on_issues.yml +++ b/.github/workflows/on_issues.yml @@ -17,23 +17,23 @@ jobs: run: | # Init echo "Starting" - + # Get issues list - curl -s https://api.github.com/repos/alexbelgium/hassio-addons/issues > issueslist + curl -s -L https://api.github.com/repos/alexbelgium/hassio-addons/issues > issueslist # Go through all folders, add to filters if not existing for f in $( find -- * -maxdepth 0 -type d | sort -r ); do if [ -f "$f"/config.json ]; then - + # Clean previously reported issues sed -i "/Open Issue :/d" "$f"/README.md sed -i "/Open Request :/d" "$f"/README.md # If there is an issue with the addon name in title, put a message COUNTER=0 while [[ $(jq -r --arg COUNTER "$COUNTER" ".["$COUNTER"].title" issueslist) != null ]]; do - + #Increment counter (( COUNTER=COUNTER+1 )) || true - + #Get variables TITLE="$(jq -r --arg COUNTER "$COUNTER" ".["$COUNTER"].title" issueslist)" TITLE="${TITLE//[<>\$\'\"]/}" @@ -66,4 +66,4 @@ jobs: commit: -u fetch: --force push: --force - + diff --git a/joal/Dockerfile b/joal/Dockerfile index 2fcc31d68..02047f944 100644 --- a/joal/Dockerfile +++ b/joal/Dockerfile @@ -34,7 +34,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # hadolint ignore=SC2015,DL4006 RUN \ if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi \ - && curl -f -s -S -J -L -o /tmp/joal.tar.gz "$(curl -f -s https://api.github.com/repos/anthonyraymond/joal/releases/latest | grep -o "http.*joal.tar.gz")" >/dev/null \ + && curl -f -s -S -J -L -o /tmp/joal.tar.gz "$(curl -f -s -L https://api.github.com/repos/anthonyraymond/joal/releases/latest | grep -o "http.*joal.tar.gz")" >/dev/null \ && mkdir -p /data/joal \ && tar zxvf /tmp/joal.tar.gz -C /data/joal >/dev/null \ && chown -R "$(id -u)":"$(id -g)" /data/joal \ diff --git a/joal/rootfs/etc/cont-init.d/99-run.sh b/joal/rootfs/etc/cont-init.d/99-run.sh index c6eb4fc73..5e20b7569 100755 --- a/joal/rootfs/etc/cont-init.d/99-run.sh +++ b/joal/rootfs/etc/cont-init.d/99-run.sh @@ -19,9 +19,9 @@ fi # download latest version if [ "$VERBOSE" = true ]; then - curl --progress-bar -f -J -L -o /tmp/joal.tar.gz "$(curl -f -s https://api.github.com/repos/anthonyraymond/joal/releases/latest | grep -o "http.*joal.tar.gz")" + curl --progress-bar -f -J -L -o /tmp/joal.tar.gz "$(curl -f -s -L https://api.github.com/repos/anthonyraymond/joal/releases/latest | grep -o "http.*joal.tar.gz")" else - curl --progress-bar -f -S -J -L -o /tmp/joal.tar.gz "$(curl -f -s https://api.github.com/repos/anthonyraymond/joal/releases/latest | grep -o "http.*joal.tar.gz")" >/dev/null + curl --progress-bar -f -S -J -L -o /tmp/joal.tar.gz "$(curl -f -s -L https://api.github.com/repos/anthonyraymond/joal/releases/latest | grep -o "http.*joal.tar.gz")" >/dev/null fi mkdir -p /data/joal tar zxvf /tmp/joal.tar.gz -C /data/joal >/dev/null diff --git a/transmission/rootfs/etc/cont-init.d/90-customUI.sh b/transmission/rootfs/etc/cont-init.d/90-customUI.sh index 71b664414..909785c3d 100755 --- a/transmission/rootfs/etc/cont-init.d/90-customUI.sh +++ b/transmission/rootfs/etc/cont-init.d/90-customUI.sh @@ -25,7 +25,7 @@ if bashio::config.has_value 'customUI' && [ ! "$CUSTOMUI" = default ] && [ ! "$C ;; "transmission-web-control") - curl -f -s -S -J -L -o /release.zip "$(curl -f -s https://api.github.com/repos/transmission-web-control/transmission-web-control/releases/latest | grep -o "http.*dist.zip" | head -1)" >/dev/null + curl -f -s -S -J -L -o /release.zip "$(curl -f -s -L https://api.github.com/repos/transmission-web-control/transmission-web-control/releases/latest | grep -o "http.*dist.zip" | head -1)" >/dev/null ### Install WebUI mkdir -p /transmission-web-control unzip -q /release.zip -d /transmission-web-control @@ -49,7 +49,7 @@ if bashio::config.has_value 'customUI' && [ ! "$CUSTOMUI" = default ] && [ ! "$C ;; "transmissionic") - TRANSMISSIONIC_VERSION=$(curl -s "https://api.github.com/repos/6c65726f79/Transmissionic/releases/latest" | jq -r .tag_name) + TRANSMISSIONIC_VERSION=$(curl -s -L "https://api.github.com/repos/6c65726f79/Transmissionic/releases/latest" | jq -r .tag_name) curl -o /tmp/transmissionic.zip -L "https://github.com/6c65726f79/Transmissionic/releases/download/${TRANSMISSIONIC_VERSION}/Transmissionic-webui-${TRANSMISSIONIC_VERSION}.zip" unzip /tmp/transmissionic.zip -d /tmp mv /tmp/web /transmissionic