Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ffuqiangg committed Mar 15, 2024
1 parent a1f7180 commit bbab38d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/N1-ImmortalWrt-18.06-K5.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,11 @@ jobs:
- name: Telegram notification
if: github.event_name == 'repository_dispatch'
run: |
firmware_num=$(curl -fsSL https://github.com/ffuqiangg/build_openwrt/releases/expanded_assets/${{ env.build_date }} | grep -oE "N1-.*.zip" | wc -l)
firmware_num="$(curl -fsSL https://github.com/ffuqiangg/build_openwrt/releases/expanded_assets/${{ env.build_date }} | grep -oE "N1-.*.zip" | sort -u | wc -l)"
MSG="
*${{ env.latest_release }}* 固件编译完成
https://github.com/ffuqiangg/build\_openwrt/releases/tag/${{ env.build_date }}
"
[[ ${firmware_num} == 4 ]] && curl "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage" \
-d "chat_id=${{ secrets.TELEGRAM_TO }}&text=${MSG}&parse_mode=MarkDown&disable_web_page_preview=true"
if [[ "${firmware_num}" == 4 ]]; then
curl "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage" -d "chat_id=${{ secrets.TELEGRAM_TO }}&text=${MSG}&parse_mode=MarkDown&disable_web_page_preview=true"
fi
7 changes: 4 additions & 3 deletions .github/workflows/N1-ImmortalWrt-23.05.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,11 @@ jobs:
- name: telegram notification
if: github.event_name == 'repository_dispatch'
run: |
firmware_num=$(curl -fsSL https://github.com/ffuqiangg/build_openwrt/releases/expanded_assets/${{ env.build_date }} | grep -oE "N1-.*.zip" | wc -l)
firmware_num="$(curl -fsSL https://github.com/ffuqiangg/build_openwrt/releases/expanded_assets/${{ env.build_date }} | grep -oE "N1-.*.zip" | sort -u | wc -l)"
MSG="
*${{ env.latest_release }}* 固件编译完成
https://github.com/ffuqiangg/build\_openwrt/releases/tag/${{ env.build_date }}
"
[[ ${firmware_num} == 4 ]] && curl "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage" \
-d "chat_id=${{ secrets.TELEGRAM_TO }}&text=${MSG}&parse_mode=MarkDown&disable_web_page_preview=true"
if [[ "${firmware_num}" == 4 ]]; then
curl "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage" -d "chat_id=${{ secrets.TELEGRAM_TO }}&text=${MSG}&parse_mode=MarkDown&disable_web_page_preview=true"
fi
7 changes: 4 additions & 3 deletions .github/workflows/N1-LEDE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ jobs:
- name: Telegram notification
if: github.event_name == 'repository_dispatch'
run: |
firmware_num=$(curl -fsSL https://github.com/ffuqiangg/build_openwrt/releases/expanded_assets/${{ env.build_date }} | grep -oE "N1-.*.zip" | wc -l)
firmware_num="$(curl -fsSL https://github.com/ffuqiangg/build_openwrt/releases/expanded_assets/${{ env.build_date }} | grep -oE "N1-.*.zip" | sort -u | wc -l)"
MSG="
*${{ env.latest_release }}* 固件编译完成
https://github.com/ffuqiangg/build\_openwrt/releases/tag/${{ env.build_date }}
"
[[ ${firmware_num} == 4 ]] && curl "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage" \
-d "chat_id=${{ secrets.TELEGRAM_TO }}&text=${MSG}&parse_mode=MarkDown&disable_web_page_preview=true"
if [[ "${firmware_num}" == 4 ]]; then
curl "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage" -d "chat_id=${{ secrets.TELEGRAM_TO }}&text=${MSG}&parse_mode=MarkDown&disable_web_page_preview=true"
fi
7 changes: 4 additions & 3 deletions .github/workflows/N1-OpenWrt-23.05.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,11 @@ jobs:
- name: telegram notification
if: github.event_name == 'repository_dispatch'
run: |
firmware_num=$(curl -fsSL https://github.com/ffuqiangg/build_openwrt/releases/expanded_assets/${{ env.build_date }} | grep -oE "N1-.*.zip" | wc -l)
firmware_num="$(curl -fsSL https://github.com/ffuqiangg/build_openwrt/releases/expanded_assets/${{ env.build_date }} | grep -oE "N1-.*.zip" | sort -u | wc -l)"
MSG="
*${{ env.latest_release }}* 固件编译完成
https://github.com/ffuqiangg/build\_openwrt/releases/tag/${{ env.build_date }}
"
[[ ${firmware_num} == 4 ]] && curl "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage" \
-d "chat_id=${{ secrets.TELEGRAM_TO }}&text=${MSG}&parse_mode=MarkDown&disable_web_page_preview=true"
if [[ "${firmware_num}" == 4 ]]; then
curl "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage" -d "chat_id=${{ secrets.TELEGRAM_TO }}&text=${MSG}&parse_mode=MarkDown&disable_web_page_preview=true"
fi

0 comments on commit bbab38d

Please sign in to comment.