-
Notifications
You must be signed in to change notification settings - Fork 11
34 lines (28 loc) · 1.09 KB
/
Copy pathcucc.yml
File metadata and controls
34 lines (28 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: ROS CUCC list
on:
schedule:
- cron: "00 21 * * 1"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set git identity
run : |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
sudo timedatectl set-timezone "Asia/Shanghai"
- name: Combine
run: |
clang="$(curl -kLfsm 5 https://ispip.clang.cn/unicom_cnc.txt)"
echo -e "${clang}" | sed -e 's/^/add address=/g' -e 's/$/ list=CUCC/g' | sed -e $'1i\\\n/ip firewall address-list' -e $'1i\\\nremove [find list=CUCC]' > cucc.rsc
- name: Apply
run: |
Emoji=("🎉" "🤞" "✨" "🎁" "🎈" "🎄" "🎨" "💋" "🍓" "🍕" "🍉" "💐" "🌴" "🚀" "🛸" "🗽" "⛅" "🌈" "🔥" "⛄" "🐶" "🏅" "🦄" "🐤")
git add .
git commit -m "${Emoji[$[$RANDOM % ${#Emoji[@]}]]} Sync $(date +%Y-%m-%d" "%H:%M:%S)"
git push -f