Skip to content

Fix UID fetch in netswitch cli #52

Fix UID fetch in netswitch cli

Fix UID fetch in netswitch cli #52

Workflow file for this run

name: Build Module Zip
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '.github/workflows/build.yml'
- '.github/scripts/**'
- 'webui/**'
- 'module/**'
- 'version'
jobs:
build:
name: Build Flashable Zip
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Build WebUI
working-directory: ./webui
run: |
bun install
bun run build
cp -r ./dist/* ../module/webroot
- name: Compile Flashable Zip
id: compileZip
run: bash .github/scripts/compile_zip.sh
- name: Upload Compiled Zip as Artifact
uses: actions/upload-artifact@v4
with:
name: Flashable-Zip
path: net-switch-*.zip
- name: Upload To Telegram
env:
CHAT_ID: ${{ secrets.CHAT_ID }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_URL: ${{ github.event.head_commit.url }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
TITLE: Net Switch
run: |
if [ ! -z "${{ secrets.CHAT_ID }}" ] && [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then
export VERSION=$(git rev-list --count HEAD)
bash .github/scripts/telegram_bot.sh ${{ steps.compileZip.outputs.zipName }}
else
echo "Telegram bot token or chatid is undefined, please add it to repository secrets!"
exit 1
fi