mirror of
https://github.com/elseif/MikroTikPatch
synced 2026-07-17 10:39:40 +00:00
Compare commits
11 Commits
0b3d6862ad
...
18fd42ae68
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18fd42ae68 | ||
|
|
2e1198189c | ||
|
|
b8f382bc34 | ||
|
|
e7a8f2bffb | ||
|
|
79a24e44eb | ||
|
|
d546633361 | ||
|
|
d5701f354c | ||
|
|
d90a121e42 | ||
|
|
a7af632dc5 | ||
|
|
21147e34f2 | ||
|
|
63f495d811 |
32
.github/workflows/main.yml
vendored
32
.github/workflows/main.yml
vendored
@ -4,23 +4,41 @@ on:
|
||||
schedule:
|
||||
- cron: "00 10 * * *" # At UTC 10:00 (Beijing 18:00) on every day
|
||||
workflow_dispatch:
|
||||
|
||||
inputs:
|
||||
version:
|
||||
description: 'Select Version (v6/v7/all)'
|
||||
required: true
|
||||
default: 'all'
|
||||
type: choice
|
||||
options:
|
||||
- all
|
||||
- v6
|
||||
- v7
|
||||
jobs:
|
||||
Patch_Stable:
|
||||
Patch_Stable_V7:
|
||||
if: |
|
||||
(github.event_name == 'schedule') ||
|
||||
(github.event_name == 'workflow_dispatch' && (github.event.inputs.version == 'all' || github.event.inputs.version == 'v7'))
|
||||
uses: ./.github/workflows/patch_v7.yml
|
||||
with:
|
||||
channel: stable
|
||||
release: true
|
||||
secrets: inherit
|
||||
|
||||
Patch_LongTerm:
|
||||
Patch_LongTerm_V7:
|
||||
if: |
|
||||
(github.event_name == 'schedule') ||
|
||||
(github.event_name == 'workflow_dispatch' && (github.event.inputs.version == 'all' || github.event.inputs.version == 'v7'))
|
||||
uses: ./.github/workflows/patch_v7.yml
|
||||
with:
|
||||
channel: long-term
|
||||
release: true
|
||||
secrets: inherit
|
||||
|
||||
Patch_Testing:
|
||||
Patch_Testing_V7:
|
||||
if: |
|
||||
(github.event_name == 'schedule') ||
|
||||
(github.event_name == 'workflow_dispatch' && (github.event.inputs.version == 'all' || github.event.inputs.version == 'v7'))
|
||||
uses: ./.github/workflows/patch_v7.yml
|
||||
with:
|
||||
channel: testing
|
||||
@ -28,6 +46,9 @@ jobs:
|
||||
secrets: inherit
|
||||
|
||||
Patch_Stable_V6:
|
||||
if: |
|
||||
(github.event_name == 'schedule') ||
|
||||
(github.event_name == 'workflow_dispatch' && (github.event.inputs.version == 'all' || github.event.inputs.version == 'v6'))
|
||||
uses: ./.github/workflows/patch_v6.yml
|
||||
with:
|
||||
channel: stable
|
||||
@ -35,6 +56,9 @@ jobs:
|
||||
secrets: inherit
|
||||
|
||||
Patch_LongTerm_V6:
|
||||
if: |
|
||||
(github.event_name == 'schedule') ||
|
||||
(github.event_name == 'workflow_dispatch' && (github.event.inputs.version == 'all' || github.event.inputs.version == 'v6'))
|
||||
uses: ./.github/workflows/patch_v6.yml
|
||||
with:
|
||||
channel: long-term
|
||||
|
||||
2
.github/workflows/patch_v6.yml
vendored
2
.github/workflows/patch_v6.yml
vendored
@ -481,8 +481,10 @@ jobs:
|
||||
files: |
|
||||
${{env.PUBLISH_DIR}}/*.zip
|
||||
${{env.PUBLISH_DIR}}/*.iso
|
||||
${{env.PUBLISH_DIR}}/routeros*.npk
|
||||
${{env.PUBLISH_DIR}}/*.zip.sha256
|
||||
${{env.PUBLISH_DIR}}/*.iso.sha256
|
||||
${{env.PUBLISH_DIR}}/routeros*.npk.sha256
|
||||
|
||||
- name: Upload Files
|
||||
if: needs.Prepare_Patch.outputs.RELEASE == 'true'
|
||||
|
||||
26
.github/workflows/patch_v7.yml
vendored
26
.github/workflows/patch_v7.yml
vendored
@ -178,7 +178,7 @@ jobs:
|
||||
echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV
|
||||
echo "PACKAGES: $PACKAGES"
|
||||
|
||||
- name: Create Squashfs for Option Package
|
||||
- name: Create Squashfs for Option and Python Package
|
||||
run: |
|
||||
echo "Creating Option Package Squashfs for channel: $CHANNEL, arch: $ARCH"
|
||||
mkdir -p $BUILD_DIR/option-root/bin/
|
||||
@ -261,6 +261,20 @@ jobs:
|
||||
echo "✅ Option Package Squashfs created: $BUILD_DIR/option.sfs"
|
||||
ls -la "$BUILD_DIR/option.sfs"
|
||||
|
||||
if [ "$ARCH" == "x86" ]; then
|
||||
wget -nv -O $BUILD_DIR/cpython.tar.gz -nv https://github.com/astral-sh/python-build-standalone/releases/download/20241206/cpython-3.11.11+20241206-x86_64-unknown-linux-musl-install_only_stripped.tar.gz
|
||||
elif [ "$ARCH" == "arm64" ]; then
|
||||
wget -nv -O $BUILD_DIR/cpython.tar.gz -nv https://github.com/indygreg/python-build-standalone/releases/download/20241206/cpython-3.11.11+20241206-aarch64-unknown-linux-gnu-install_only_stripped.tar.gz
|
||||
fi
|
||||
tar -xzf $BUILD_DIR/cpython.tar.gz -C $BUILD_DIR
|
||||
rm $BUILD_DIR/cpython.tar.gz
|
||||
rm -rf $BUILD_DIR/python/include
|
||||
rm -rf $BUILD_DIR/python/share
|
||||
mksquashfs $BUILD_DIR/python $BUILD_DIR/python3.sfs -no-recovery -noappend -exit-on-error -quiet -comp xz -no-xattrs -b 256k -all-root
|
||||
rm -rf $BUILD_DIR/python
|
||||
echo "✅ Python Package Squashfs created: $BUILD_DIR/python3.sfs"
|
||||
ls -la "$BUILD_DIR/python3.sfs"
|
||||
|
||||
- name: Cache mikrotik-${{ env.VERSION }}${{ env.ARCH_EXT }}.iso
|
||||
id: cache-mikrotik-iso
|
||||
uses: actions/cache@v5
|
||||
@ -313,10 +327,10 @@ jobs:
|
||||
for file in $NPK_FILES; do
|
||||
python3 npk.py sign $file $file
|
||||
done
|
||||
OPTION_FROM_NPK=gps-$VERSION$ARCH_EXT.npk
|
||||
OPTION_NPK=option-$VERSION$ARCH_EXT.npk
|
||||
python3 npk.py create $BUILD_DIR/all_packages/$OPTION_FROM_NPK $BUILD_DIR/all_packages/$OPTION_NPK option $BUILD_DIR/option.sfs -desc="busybox"
|
||||
python3 npk.py create $BUILD_DIR/all_packages/gps-$VERSION$ARCH_EXT.npk $BUILD_DIR/all_packages/option-$VERSION$ARCH_EXT.npk option $BUILD_DIR/option.sfs -desc="busybox"
|
||||
rm -rf $BUILD_DIR/option.sfs
|
||||
python3 npk.py create $BUILD_DIR/all_packages/gps-$VERSION$ARCH_EXT.npk $BUILD_DIR/all_packages/python3-$VERSION$ARCH_EXT.npk python3 $BUILD_DIR/python3.sfs -desc="python 3.11.13"
|
||||
rm -rf $BUILD_DIR/python3.sfs
|
||||
echo "✅ all package npk files already signed: "
|
||||
ls -la $BUILD_DIR/all_packages/*.npk
|
||||
(cd $BUILD_DIR/all_packages && zip -r $PUBLISH_DIR/all_packages-$ARCH-$VERSION.zip .)
|
||||
@ -359,7 +373,7 @@ jobs:
|
||||
|
||||
- name: Get refind
|
||||
if: matrix.arch == 'x86' && steps.cache-refind.outputs.cache-hit != 'true'
|
||||
run: sudo wget -nv -O $BUILD_DIR/refind-bin-0.14.2.zip https://downloads.sourceforge.net/project/refind/0.14.2/refind-bin-0.14.2.zip
|
||||
run: wget -nv -O $BUILD_DIR/refind-bin-0.14.2.zip https://downloads.sourceforge.net/project/refind/0.14.2/refind-bin-0.14.2.zip
|
||||
|
||||
- name: Create ISO & INSTALL image files
|
||||
run: |
|
||||
@ -889,8 +903,10 @@ jobs:
|
||||
files: |
|
||||
${{env.PUBLISH_DIR}}/*.zip
|
||||
${{env.PUBLISH_DIR}}/*.iso
|
||||
${{env.PUBLISH_DIR}}/routeros*.npk
|
||||
${{env.PUBLISH_DIR}}/*.zip.sha256
|
||||
${{env.PUBLISH_DIR}}/*.iso.sha256
|
||||
${{env.PUBLISH_DIR}}/routeros*.npk.sha256
|
||||
|
||||
- name: Upload Files
|
||||
if: needs.Prepare_Patch.outputs.RELEASE == 'true'
|
||||
|
||||
@ -498,7 +498,7 @@
|
||||
title:"RouterOS v6",
|
||||
versions:[ { title:"Long-Term", version:routeros6_longterm }, { title:"Stable", version:routeros6_stable } ],
|
||||
groups: [
|
||||
{ title:"X86", arch:"x86", downloads:[ { title:"Extra packages", type:"extra" }, { title:"CD Image", type:"iso" }, { title:"Install image", type:"install" }, { title:"Changelog", type:"changlog" } ] }
|
||||
{ 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:"Changelog", type:"changlog" } ] }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -518,6 +518,8 @@
|
||||
if (version.charAt(0) === "6" && arch !== "x86") return files;
|
||||
// Main package for RouterOS v7
|
||||
if (type === "main" && version.charAt(0) === "7") files.push(`routeros-${version}${arch === "x86" ? "" : "-" + arch}.npk`);
|
||||
// Main package for RouterOS v6
|
||||
if (type === "main" && version.charAt(0) === "6") files.push(`routeros-x86-${version}.npk`);
|
||||
// ISO images
|
||||
if (type === "iso") files.push(`mikrotik-${version}${arch === "x86" ? "" : "-" + arch}.iso`);
|
||||
// Extra packages
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user