modified: .github/workflows/mikrotik_patch.yml

This commit is contained in:
zyb 2024-06-30 04:39:08 +08:00
parent fe0b266716
commit 588e2a0714

View File

@ -5,11 +5,18 @@ on:
schedule: schedule:
- cron: "0 0 * * *" - cron: "0 0 * * *"
workflow_dispatch: workflow_dispatch:
inputs:
version:
description: 'RouterOS version, blank for latest'
required: false
default: ''
type: string
permissions: permissions:
contents: write contents: write
jobs: jobs:
Patch_Latest_RouterOS: Patch_RouterOS_7:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
@ -70,7 +77,11 @@ jobs:
- name: Get latest routeros version - name: Get latest routeros version
run: | run: |
echo $(uname -a) echo $(uname -a)
LATEST_VERSION=$(wget -nv -O - ${{ env.LATEST_VERSION_URL }}.${{ matrix.channel }} | cut -d ' ' -f1) if [ "${{ inputs.version }}" == "" ]; then
LATEST_VERSION=$(wget -nv -O - ${{ env.LATEST_VERSION_URL }}.${{ matrix.channel }} | cut -d ' ' -f1)
else
LATEST_VERSION=${{ inputs.version }}
fi
echo Latest Version:$LATEST_VERSION echo Latest Version:$LATEST_VERSION
wget -nv -O CHANGELOG.txt https://upgrade.mikrotik.com/routeros/$LATEST_VERSION/CHANGELOG wget -nv -O CHANGELOG.txt https://upgrade.mikrotik.com/routeros/$LATEST_VERSION/CHANGELOG
cat CHANGELOG.txt cat CHANGELOG.txt