Compare commits

..

8 Commits

Author SHA1 Message Date
elseif
a988945f52 update keygen 2026-08-26 01:34:39 +08:00
elseif
e94750a0d8 update keygen 2026-08-25 21:21:44 +08:00
elseif
489427c34f use musl-toolchain compile busybox 2026-08-25 19:48:01 +08:00
elseif
f7a2316049 Merge branch 'main' of github.com:elseif/MikroTikPatch 2026-08-25 17:22:51 +08:00
elseif
7410c6dc6b modified: .github/workflows/build_docker.yml
modified:   index.html
2026-08-25 17:22:35 +08:00
elseif
fc1d950da6 Update patch_v7.yml
Signed-off-by: elseif <elseif@live.cn>
2026-08-21 19:00:54 +08:00
elseif
622ba70c2a Update patch_v7.yml
Signed-off-by: elseif <elseif@live.cn>
2026-08-21 17:42:56 +08:00
elseif
4761e53917 Update main.yml
Signed-off-by: elseif <elseif@live.cn>
2026-08-21 17:40:18 +08:00
8 changed files with 57 additions and 47 deletions

View File

@@ -7,7 +7,12 @@ on:
required: false required: false
default: '' default: ''
type: string type: string
force:
description: "Force rebuild even if version already exists"
required: false
default: false
type: boolean
permissions: permissions:
packages: write packages: write
jobs: jobs:
@@ -62,25 +67,30 @@ jobs:
id: filter_matrix id: filter_matrix
env: env:
IMAGE: "ghcr.io/${{ github.repository_owner }}/chr" IMAGE: "ghcr.io/${{ github.repository_owner }}/chr"
FORCE: ${{ github.event.inputs.force == 'true' }}
run: | run: |
MATRIX='${{ steps.get_versions.outputs.MATRIX }}' 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 set +e
VERSION=$(echo "$row" | jq -r '.version') docker manifest inspect "${IMAGE}:${VERSION}" >/dev/null 2>&1
CHANNEL=$(echo "$row" | jq -r '.channel') RET=$?
set -e
set +e if [ "$RET" -eq 0 ]; then
docker manifest inspect "${IMAGE}:${VERSION}" >/dev/null 2>&1 echo "Skipping already published version: ${VERSION}"
RET=$? else
set -e FILTERED=$(echo "$FILTERED" | jq -c --arg VERSION "$VERSION" --arg CHANNEL "$CHANNEL" '. + [{"version": $VERSION, "channel": $CHANNEL}]')
fi
if [ "$RET" -eq 0 ]; then done < <(echo "$MATRIX" | jq -c '.[]')
echo "Skipping already published version: ${VERSION}" fi
else
FILTERED=$(echo "$FILTERED" | jq -c --arg VERSION "$VERSION" --arg CHANNEL "$CHANNEL" '. + [{"version": $VERSION, "channel": $CHANNEL}]')
fi
done < <(echo "$MATRIX" | jq -c '.[]')
echo "Filtered matrix: $FILTERED" echo "Filtered matrix: $FILTERED"
echo "MATRIX=$FILTERED" >> "$GITHUB_OUTPUT" echo "MATRIX=$FILTERED" >> "$GITHUB_OUTPUT"

View File

@@ -35,25 +35,25 @@ jobs:
release: true release: true
secrets: inherit secrets: inherit
Patch_Testing_V7: # Patch_Testing_V7:
if: | # if: |
(github.event_name == 'schedule') || # (github.event_name == 'schedule') ||
(github.event_name == 'workflow_dispatch' && (github.event.inputs.version == 'all' || github.event.inputs.version == 'v7')) # (github.event_name == 'workflow_dispatch' && (github.event.inputs.version == 'all' || github.event.inputs.version == 'v7'))
uses: ./.github/workflows/patch_v7.yml # uses: ./.github/workflows/patch_v7.yml
with: # with:
channel: testing # channel: testing
release: true # release: true
secrets: inherit # secrets: inherit
Patch_Development_V7: # Patch_Development_V7:
if: | # if: |
(github.event_name == 'schedule') || # (github.event_name == 'schedule') ||
(github.event_name == 'workflow_dispatch' && (github.event.inputs.version == 'all' || github.event.inputs.version == 'v7')) # (github.event_name == 'workflow_dispatch' && (github.event.inputs.version == 'all' || github.event.inputs.version == 'v7'))
uses: ./.github/workflows/patch_v7.yml # uses: ./.github/workflows/patch_v7.yml
with: # with:
channel: development # channel: development
release: true # release: true
secrets: inherit # secrets: inherit
Patch_Stable_V6: Patch_Stable_V6:
if: | if: |

View File

@@ -10,8 +10,8 @@ on:
options: options:
- stable - stable
- long-term - long-term
- testing # - testing
- development # - development
arch: arch:
description: 'Architecture (x86, arm64)' description: 'Architecture (x86, arm64)'
required: true required: true
@@ -623,7 +623,7 @@ jobs:
truncate --size 128M $BUILD_DIR/chr-$VERSION$ARCH_EXT.img truncate --size 128M $BUILD_DIR/chr-$VERSION$ARCH_EXT.img
sgdisk \ sgdisk \
--zap-all \ --zap-all \
--set-alignment=8 \ --set-alignment=1 \
--new=1:34:+32M --typecode=1:8300 --change-name=1:"RouterOS Boot" \ --new=1:34:+32M --typecode=1:8300 --change-name=1:"RouterOS Boot" \
--new=2:0:0 --typecode=2:8300 --change-name=2:"RouterOS" \ --new=2:0:0 --typecode=2:8300 --change-name=2:"RouterOS" \
--gpttombr=1:2 \ --gpttombr=1:2 \
@@ -632,7 +632,7 @@ jobs:
printf '\x01' | dd of=$BUILD_DIR/mbr.bin bs=1 count=1 seek=336 conv=notrunc printf '\x01' | dd of=$BUILD_DIR/mbr.bin bs=1 count=1 seek=336 conv=notrunc
sgdisk \ sgdisk \
--zap-all \ --zap-all \
--set-alignment=8 \ --set-alignment=1 \
--new=1:34:+32M --typecode=1:EF00 --change-name=1:"RouterOS Boot" \ --new=1:34:+32M --typecode=1:EF00 --change-name=1:"RouterOS Boot" \
--new=2:0:0 --typecode=2:8300 --change-name=2:"RouterOS" \ --new=2:0:0 --typecode=2:8300 --change-name=2:"RouterOS" \
$BUILD_DIR/chr-$VERSION$ARCH_EXT.img $BUILD_DIR/chr-$VERSION$ARCH_EXT.img
@@ -699,7 +699,7 @@ jobs:
truncate --size 128M $BUILD_DIR/chr-$VERSION$ARCH_EXT-legacy-bios.img truncate --size 128M $BUILD_DIR/chr-$VERSION$ARCH_EXT-legacy-bios.img
sgdisk \ sgdisk \
--zap-all \ --zap-all \
--set-alignment=8 \ --set-alignment=1 \
--new=1:34:+32M --typecode=1:8300 --change-name=1:"RouterOS Boot" --attributes=1:set:2 \ --new=1:34:+32M --typecode=1:8300 --change-name=1:"RouterOS Boot" --attributes=1:set:2 \
--new=2:0:-4096 --typecode=2:8300 --change-name=2:"RouterOS" \ --new=2:0:-4096 --typecode=2:8300 --change-name=2:"RouterOS" \
--gpttombr=1:2 \ --gpttombr=1:2 \
@@ -710,7 +710,7 @@ jobs:
printf '\x80' | sudo dd of=$BUILD_DIR/mbr.bin bs=1 count=1 seek=446 conv=notrunc printf '\x80' | sudo dd of=$BUILD_DIR/mbr.bin bs=1 count=1 seek=446 conv=notrunc
sgdisk \ sgdisk \
--zap-all \ --zap-all \
--set-alignment=8 \ --set-alignment=1 \
--new=1:34:+32M --typecode=1:8300 --change-name=1:"RouterOS Boot" --attributes=1:set:2 \ --new=1:34:+32M --typecode=1:8300 --change-name=1:"RouterOS Boot" --attributes=1:set:2 \
--new=2:0:-4096 --typecode=2:8300 --change-name=2:"RouterOS" \ --new=2:0:-4096 --typecode=2:8300 --change-name=2:"RouterOS" \
$BUILD_DIR/chr-$VERSION$ARCH_EXT-legacy-bios.img $BUILD_DIR/chr-$VERSION$ARCH_EXT-legacy-bios.img
@@ -782,7 +782,7 @@ jobs:
truncate --size 128M $BUILD_DIR/chr-$VERSION$ARCH_EXT.img truncate --size 128M $BUILD_DIR/chr-$VERSION$ARCH_EXT.img
sgdisk \ sgdisk \
--zap-all \ --zap-all \
--set-alignment=8 \ --set-alignment=1 \
--new=1:34:+32M --typecode=1:8300 --change-name=1:"RouterOS Boot" \ --new=1:34:+32M --typecode=1:8300 --change-name=1:"RouterOS Boot" \
--new=2:0:0 --typecode=2:8300 --change-name=2:"RouterOS" \ --new=2:0:0 --typecode=2:8300 --change-name=2:"RouterOS" \
--gpttombr=1:2 \ --gpttombr=1:2 \
@@ -791,7 +791,7 @@ jobs:
printf '\x01' | dd of=$BUILD_DIR/mbr.bin bs=1 count=1 seek=336 conv=notrunc printf '\x01' | dd of=$BUILD_DIR/mbr.bin bs=1 count=1 seek=336 conv=notrunc
sgdisk \ sgdisk \
--zap-all \ --zap-all \
--set-alignment=8 \ --set-alignment=1 \
--new=1:34:+32M --typecode=1:EF00 --change-name=1:"RouterOS Boot" \ --new=1:34:+32M --typecode=1:EF00 --change-name=1:"RouterOS Boot" \
--new=2:0:0 --typecode=2:8300 --change-name=2:"RouterOS" \ --new=2:0:0 --typecode=2:8300 --change-name=2:"RouterOS" \
$BUILD_DIR/chr-$VERSION$ARCH_EXT.img $BUILD_DIR/chr-$VERSION$ARCH_EXT.img

Binary file not shown.

Binary file not shown.

View File

@@ -442,9 +442,9 @@
// Fetch latest version numbers from MikroTik servers // Fetch latest version numbers from MikroTik servers
const loadingOverlay = document.getElementById("loading"); 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.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.long-term?ts=${Date.now()}`, "6.49.18"),
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWEST6.stable?ts=${Date.now()}`, "6.49.19"), fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWEST6.stable?ts=${Date.now()}`, "6.49.19"),
]); ]);
@@ -456,7 +456,7 @@
const downloads =[ const downloads =[
{ {
title:"RouterOS v7", 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: [ 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:"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" } ] }, { 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", 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:[ 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:"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" } ] } { 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 // Generate version selection buttons
versionBtnsContainer.innerHTML = ` versionBtnsContainer.innerHTML = `
<button data-version="${routeros7_longterm}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v7 Long-Term</button>
<button data-version="${routeros7_stable}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v7 Stable</button> <button data-version="${routeros7_stable}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v7 Stable</button>
<button data-version="${routeros7_testing}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v7 Testing</button>
<button data-version="${routeros6_longterm}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v6 Long-Term</button> <button data-version="${routeros6_longterm}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v6 Long-Term</button>
<button data-version="${routeros6_stable}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v6 Stable</button> <button data-version="${routeros6_stable}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v6 Stable</button>
`; `;

Binary file not shown.

Binary file not shown.