mirror of
https://huihui.cat/mirrors/MikroTikPatch.git
synced 2025-12-10 03:24:37 +01:00
modified: .github/workflows/mikrotik_patch_7.yml
This commit is contained in:
parent
511392906b
commit
78f63469c9
1 changed files with 17 additions and 14 deletions
31
.github/workflows/mikrotik_patch_7.yml
vendored
31
.github/workflows/mikrotik_patch_7.yml
vendored
|
|
@ -60,12 +60,12 @@ env:
|
|||
CUSTOM_CLOUD_URL: ${{ secrets.CUSTOM_CLOUD_URL }}
|
||||
|
||||
jobs:
|
||||
|
||||
Set_Variables:
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
BUILD_TIME: ${{ steps.set_vars.outputs.BUILD_TIME }}
|
||||
RELEASE: ${{ steps.set_vars.outputs.RELEASE }}
|
||||
MATRIX_JSON: ${{ steps.set_vars.outputs.MATRIX_JSON }}
|
||||
steps:
|
||||
- name: Set variables
|
||||
id: set_vars
|
||||
|
|
@ -79,30 +79,33 @@ jobs:
|
|||
if [ -z "$RELEASE" ]; then
|
||||
RELEASE=false
|
||||
fi
|
||||
ARCH="${{ github.event.inputs.arch }}"
|
||||
CHANNEL="${{ github.event.inputs.channel }}"
|
||||
MATRIX_JSON=$(jq -nc --arg arch "$ARCH" --arg channel "$CHANNEL" '[{arch: $arch, channel: $channel}]')
|
||||
else
|
||||
BUILD_TIME=$(date +'%Y%m%d%H%M%S')
|
||||
RELEASE=true
|
||||
MATRIX_JSON='[
|
||||
{"arch":"x86","channel":"stable"},
|
||||
{"arch":"arm64","channel":"stable"},
|
||||
{"arch":"x86","channel":"testing"},
|
||||
{"arch":"arm64","channel":"testing"}
|
||||
]'
|
||||
fi
|
||||
echo "BUILD_TIME=$BUILD_TIME" >> $GITHUB_OUTPUT
|
||||
echo "RELEASE=$RELEASE" >> $GITHUB_OUTPUT
|
||||
echo "Build time is $BUILD_TIME"
|
||||
echo "Release flag is $RELEASE"
|
||||
echo "MATRIX_JSON=$MATRIX_JSON" >> $GITHUB_OUTPUT
|
||||
echo "::group::Setting variables..."
|
||||
echo "::notice title=Build Time::$BUILD_TIME"
|
||||
echo "::notice title=Release Enabled::$RELEASE"
|
||||
echo "::notice title=Matrix JSON::$MATRIX_JSON"
|
||||
echo "::endgroup::"
|
||||
|
||||
Patch_RouterOS:
|
||||
needs: Set_Variables
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- arch: x86
|
||||
channel: stable
|
||||
- arch: arm64
|
||||
channel: stable
|
||||
- arch: x86
|
||||
channel: testing
|
||||
- arch: arm64
|
||||
channel: testing
|
||||
if: ${{ github.event_name != 'workflow_dispatch' || (github.event.inputs.arch == matrix.arch && github.event.inputs.channel == matrix.channel) }}
|
||||
matrix: ${{ fromJSON(needs.Set_Variables.outputs.MATRIX_JSON) }}
|
||||
env:
|
||||
TZ: 'Asia/Shanghai'
|
||||
BUILD_TIME: ${{ needs.Set_Variables.outputs.BUILD_TIME }}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue