Tieba_Github-Actions #1922
This file contains 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: Tieba_Github-Actions | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: 15 4/12 * * * | |
jobs: | |
run-it: | |
runs-on: ubuntu-latest | |
name: Tieba_Github-Actions | |
steps: | |
- name: Checkout master | |
uses: actions/checkout@master | |
- name: PHP-Runner | |
uses: franzliedke/[email protected] | |
- name: Tieba-Checkin | |
env: | |
BDUSS: ${{ secrets.BDUSS }} | |
run: | | |
random_time=$(($RANDOM % 45)) | |
echo "等待 ${random_time} 分钟后开始签到" | |
for((i=1;i<=${random_time};i++)); | |
do | |
echo "倒计时 $[${random_time}-$i] 分钟" | |
sleep 1m | |
done | |
old_bduss=xxxxx | |
for new_bduss in ${BDUSS[*]} | |
do | |
sed -i "s|$old_bduss|$new_bduss|" tieba.php | |
php tieba.php | |
old_bduss=$new_bduss | |
random_time=$(($RANDOM % 3)) | |
echo "等待${random_time}分钟后签到下一个账号" | |
sleep ${random_time} | |
done |