Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update curl command and download url to match Mikrotik website change #32

Merged
merged 2 commits into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" && \
Expand Down