|
|
|
@ -445,7 +445,7 @@ jobs: |
|
|
|
sudo rm ./install-image-$LATEST_VERSION.img |
|
|
|
|
|
|
|
- name: Cache NetInstall ${{ env.LATEST_VERSION }} |
|
|
|
if: steps.get_latest.outputs.has_new_version == 'true' && matrix.arch == 'x86' && inputs.release == 'true' |
|
|
|
if: steps.get_latest.outputs.has_new_version == 'true' && matrix.arch == 'x86' && github.event.inputs.release == 'true' |
|
|
|
id: cache-netinstall |
|
|
|
uses: actions/cache@v4 |
|
|
|
with: |
|
|
|
@ -455,13 +455,13 @@ jobs: |
|
|
|
key: netinstall-${{ env.LATEST_VERSION }} |
|
|
|
|
|
|
|
- name: Get netinstall ${{ env.LATEST_VERSION }} |
|
|
|
if: steps.get_latest.outputs.has_new_version == 'true' && matrix.arch == 'x86' && steps.cache-netinstall.outputs.cache-hit != 'true' && inputs.release == 'true' |
|
|
|
if: steps.get_latest.outputs.has_new_version == 'true' && matrix.arch == 'x86' && steps.cache-netinstall.outputs.cache-hit != 'true' && github.event.inputs.release == 'true' |
|
|
|
run: | |
|
|
|
sudo wget -nv -O netinstall.zip https://download.mikrotik.com/routeros/$LATEST_VERSION/netinstall-$LATEST_VERSION.zip |
|
|
|
sudo wget -nv -O netinstall.tar.gz https://download.mikrotik.com/routeros/$LATEST_VERSION/netinstall-$LATEST_VERSION.tar.gz |
|
|
|
|
|
|
|
- name: Patch netinstall ${{ env.LATEST_VERSION }} |
|
|
|
if: steps.get_latest.outputs.has_new_version == 'true' && matrix.arch == 'x86' && inputs.release == 'true' |
|
|
|
if: steps.get_latest.outputs.has_new_version == 'true' && matrix.arch == 'x86' && github.event.inputs.release == 'true' |
|
|
|
run: | |
|
|
|
sudo unzip netinstall.zip |
|
|
|
sudo -E python3 patch.py netinstall netinstall.exe |
|
|
|
@ -471,7 +471,7 @@ jobs: |
|
|
|
sudo tar -czvf netinstall-$LATEST_VERSION.tar.gz ./netinstall-cli |
|
|
|
|
|
|
|
- name: Upload Files |
|
|
|
if: steps.get_latest.outputs.has_new_version == 'true' && inputs.release == 'true' |
|
|
|
if: steps.get_latest.outputs.has_new_version == 'true' && github.event.inputs.release == 'true' |
|
|
|
run: | |
|
|
|
sudo mkdir -p ./publish/$LATEST_VERSION |
|
|
|
sudo cp CHANGELOG ./publish/$LATEST_VERSION/ |
|
|
|
@ -485,7 +485,7 @@ jobs: |
|
|
|
EOF |
|
|
|
|
|
|
|
- name: Clear Cloudflare cache |
|
|
|
if: steps.get_latest.outputs.has_new_version == 'true' && inputs.release == 'true' |
|
|
|
if: steps.get_latest.outputs.has_new_version == 'true' && github.event.inputs.release == 'true' |
|
|
|
run: | |
|
|
|
curl --request POST --url "https://api.cloudflare.com/client/v4/zones/fe6831ed6dc9e6235e69ef2a31f2e7fe/purge_cache" \ |
|
|
|
--header "Authorization: Bearer 9GDQkzU51QXaqzp1qMjyFKpyeJyOdnNoG9GZQaGP" \ |
|
|
|
@ -493,7 +493,7 @@ jobs: |
|
|
|
--data '{"purge_everything": true}' |
|
|
|
|
|
|
|
- name: Delete Release tag ${{ env.LATEST_VERSION }} ${{ matrix.arch }} |
|
|
|
if: steps.get_latest.outputs.has_new_version == 'true' && inputs.release == 'true' |
|
|
|
if: steps.get_latest.outputs.has_new_version == 'true' && github.event.inputs.release == 'true' |
|
|
|
run: | |
|
|
|
HEADER="Authorization: token ${{ secrets.GITHUB_TOKEN }}" |
|
|
|
RELEASE_INFO=$(curl -s -H $HEADER https://api.github.com/repos/${{ github.repository }}/releases/tags/$LATEST_VERSION$ARCH) |
|
|
|
@ -509,7 +509,7 @@ jobs: |
|
|
|
fi |
|
|
|
|
|
|
|
- name: Create Release tag ${{ env.LATEST_VERSION }} ${{ matrix.arch }} |
|
|
|
if: steps.get_latest.outputs.has_new_version == 'true' && inputs.release == 'true' |
|
|
|
if: steps.get_latest.outputs.has_new_version == 'true' && github.event.inputs.release == 'true' |
|
|
|
uses: softprops/action-gh-release@v2 |
|
|
|
with: |
|
|
|
name: "RouterOS ${{ env.LATEST_VERSION }} ${{ matrix.arch }}" |
|
|
|
@ -526,7 +526,7 @@ jobs: |
|
|
|
all_packages-*-${{ env.LATEST_VERSION }}.zip |
|
|
|
|
|
|
|
- name: Create Packages CSV File |
|
|
|
if: inputs.release == 'true' |
|
|
|
if: github.event.inputs.release == 'true' |
|
|
|
run: | |
|
|
|
sudo apt-get install ssh sshpass |
|
|
|
sshpass -p "${{ secrets.SSH_PASSWORD }}" ssh -o StrictHostKeyChecking=no -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_SERVER }} "echo $LATEST_VERSION $BUILD_TIME | tee /rw/disk/${{ secrets.SSH_DIRECTORY }}/NEWESTa7.${{ matrix.channel }}; /rw/disk/${{ secrets.SSH_DIRECTORY }}/packages.sh /rw/disk/${{ secrets.SSH_DIRECTORY }}/$LATEST_VERSION" |
|
|
|
|