ROS CNIP6 list #638
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ROS CNIP6 list | |
| on: | |
| schedule: | |
| - cron: "00 0 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| 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/all_cn_ipv6.txt)" | |
| echo -e "${clang}" | sed -e 's/^/add address=/g' -e 's/$/ list=CNIP/g' | sed -e $'1i\\\n/ipv6 firewall address-list' -e $'1i\\\nremove [find list=CNIP]' > cnip6.rsc | |
| - name: Apply | |
| run: | | |
| Emoji=("🎉" "🤞" "✨" "🎁" "🎈" "🎄" "🎨" "💋" "🍓" "🍕" "🍉" "💐" "🌴" "🚀" "🛸" "🗽" "⛅" "🌈" "🔥" "⛄" "🐶" "🏅" "🦄" "🐤") | |
| git add . | |
| git commit -m "${Emoji[$[$RANDOM % ${#Emoji[@]}]]} Sync $(date +%Y-%m-%d" "%H:%M:%S)" | |
| git push -f |