Merge pull request #32 from Bluebugs/master

Update curl command and download url to match Mikrotik website change
This commit is contained in:
Pavel Zloi 2024-04-07 10:47:45 +03:00 committed by GitHub
commit 7dddfc3239
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@ jobs:
- name: Check new release
id: check_release
run: |
LAST_MIKROTIK_RELEASE=$(curl https://mikrotik.com/download/archive -o - 2>/dev/null | grep -o '<a href=['"'"'"][^"'"'"']*['"'"'"]' | sed -e 's/^<a href=["'"'"']//' -e 's/["'"'"']$//' | grep -i vdi | sed 's:.*/::' | sort -V | tail -n 1 | sed -r 's/chr\-(.*)\.vdi/\1/gi'| sed -r 's/\.zip//gi')
LAST_MIKROTIK_RELEASE=$( curl https://mikrotik.com/download/archive -o - 2>/dev/null | grep -o '<a href=['"'"'"][^"'"'"']*['"'"'"]' | sed -e 's/^<a href=["'"'"']//' -e 's/["'"'"']$//' | grep -i c-stable | sed -r 's/\#c-stable-v//gi'|sed -r 's/_/\./gi'|sort -V|tail -n 1)
NEW_TAG=$(grep "ROUTEROS_VERSION=\"" Dockerfile |cut -d "\"" -f 2)
if [ "$LAST_MIKROTIK_RELEASE" != "$NEW_TAG" ]; then
echo "New version found: $LAST_MIKROTIK_RELEASE"

View file

@ -19,7 +19,7 @@ RUN set -xe \
# Environments which may be change
ENV ROUTEROS_VERSION="7.14.1"
ENV ROUTEROS_IMAGE="chr-${ROUTEROS_VERSION}.vdi"
ENV ROUTEROS_PATH="https://download.mikrotik.com/routeros/${ROUTEROS_VERSION}/${ROUTEROS_IMAGE}.zip"
ENV ROUTEROS_PATH="https://cdn.mikrotik.com/routeros/${ROUTEROS_VERSION}/${ROUTEROS_IMAGE}.zip"
# Download VDI image from remote site
RUN wget "$ROUTEROS_PATH" -O "/routeros/${ROUTEROS_IMAGE}.zip" && \