diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml
index 9950d15..f062ff7 100644
--- a/.github/workflows/build_docker.yml
+++ b/.github/workflows/build_docker.yml
@@ -7,7 +7,12 @@ on:
required: false
default: ''
type: string
-
+ force:
+ description: "Force rebuild even if version already exists"
+ required: false
+ default: false
+ type: boolean
+
permissions:
packages: write
jobs:
@@ -62,25 +67,30 @@ jobs:
id: filter_matrix
env:
IMAGE: "ghcr.io/${{ github.repository_owner }}/chr"
+ FORCE: ${{ github.event.inputs.force == 'true' }}
run: |
MATRIX='${{ steps.get_versions.outputs.MATRIX }}'
- FILTERED='[]'
+ if [ "$FORCE" = "true" ]; then
+ echo "Force mode enabled, skipping version existence check."
+ FILTERED="$MATRIX"
+ else
+ FILTERED='[]'
+ while read -r row; do
+ VERSION=$(echo "$row" | jq -r '.version')
+ CHANNEL=$(echo "$row" | jq -r '.channel')
- while read -r row; do
- VERSION=$(echo "$row" | jq -r '.version')
- CHANNEL=$(echo "$row" | jq -r '.channel')
+ set +e
+ docker manifest inspect "${IMAGE}:${VERSION}" >/dev/null 2>&1
+ RET=$?
+ set -e
- set +e
- docker manifest inspect "${IMAGE}:${VERSION}" >/dev/null 2>&1
- RET=$?
- set -e
-
- if [ "$RET" -eq 0 ]; then
- echo "Skipping already published version: ${VERSION}"
- else
- FILTERED=$(echo "$FILTERED" | jq -c --arg VERSION "$VERSION" --arg CHANNEL "$CHANNEL" '. + [{"version": $VERSION, "channel": $CHANNEL}]')
- fi
- done < <(echo "$MATRIX" | jq -c '.[]')
+ if [ "$RET" -eq 0 ]; then
+ echo "Skipping already published version: ${VERSION}"
+ else
+ FILTERED=$(echo "$FILTERED" | jq -c --arg VERSION "$VERSION" --arg CHANNEL "$CHANNEL" '. + [{"version": $VERSION, "channel": $CHANNEL}]')
+ fi
+ done < <(echo "$MATRIX" | jq -c '.[]')
+ fi
echo "Filtered matrix: $FILTERED"
echo "MATRIX=$FILTERED" >> "$GITHUB_OUTPUT"
diff --git a/index.html b/index.html
index 7419df2..f4b2983 100644
--- a/index.html
+++ b/index.html
@@ -442,9 +442,9 @@
// Fetch latest version numbers from MikroTik servers
const loadingOverlay = document.getElementById("loading");
- const [routeros7_stable, routeros7_testing, routeros6_longterm, routeros6_stable] = await Promise.all([
+ const [routeros7_stable, routeros7_longterm, routeros6_longterm, routeros6_stable] = await Promise.all([
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWESTa7.stable?ts=${Date.now()}`, "7.19.4"),
- fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWESTa7.testing?ts=${Date.now()}`, "7.20rc1"),
+ fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWESTa7.long-term?ts=${Date.now()}`, "7.20rc1"),
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWEST6.long-term?ts=${Date.now()}`, "6.49.18"),
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWEST6.stable?ts=${Date.now()}`, "6.49.19"),
]);
@@ -456,7 +456,7 @@
const downloads =[
{
title:"RouterOS v7",
- versions:[ { title:"Stable", version:routeros7_stable }, { title:"Testing", version:routeros7_testing } ],
+ versions:[ { title:"Long-Term", version:routeros7_longterm },{ title:"Stable", version:routeros7_stable } ],
groups: [
{ title:"ARM64 / AMPERE", arch:"arm64", downloads:[ { title:"Main package", type:"main" }, { title:"Extra packages", type:"extra" }, { title:"ISO image for AMPERE", type:"iso" } ] },
{ title:"X86", arch:"x86", downloads:[ { title:"Main package", type:"main" }, { title:"Extra packages", type:"extra" }, { title:"CD Image", type:"iso" }, { title:"Install image", type:"install" } ] },
@@ -472,7 +472,7 @@
},
{
title:"Cloud Hosted Router",
- versions:[ { title:"Long-Term", version:routeros6_longterm }, { title:"Stable", version:routeros6_stable }, { title:"Stable", version:routeros7_stable }, { title:"Testing", version:routeros7_testing } ],
+ versions:[ { title:"Long-Term", version:routeros6_longterm }, { title:"Stable", version:routeros6_stable }, { title:"Long-Term", version:routeros7_longterm }, { title:"Stable", version:routeros7_stable } ],
groups:[
{ title:"X86", arch:"x86", downloads:[ { title:"Main package", type:"main" }, { title:"Extra packages", type:"extra" }, { title:"VHDX image", type:"vhdx" }, { title:"VMDK image", type:"vmdk" }, { title:"VDI image", type:"vdi" }, { title:"VirtualPC image", type:"vhd" }, { title:"Raw disk image", type:"img" }, { title:"OVA template", type:"ova" } ] },
{ title:"ARM64 / AMPERE", arch:"arm64", downloads:[ { title:"Main package", type:"main" }, { title:"Extra packages", type:"extra" }, { title:"VHDX image", type:"vhdx" }, { title:"VMDK image", type:"vmdk" }, { title:"VDI image", type:"vdi" }, { title:"VirtualPC image", type:"vhd" }, { title:"Raw disk image", type:"img" } ] }
@@ -709,8 +709,8 @@
// Generate version selection buttons
versionBtnsContainer.innerHTML = `
+
-
`;