拉取所有源 #102
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: 拉取所有源 | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: [ "main" ] | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '0 0 * * MON' | |
workflow_dispatch: | |
jobs: | |
pobing: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 克隆仓库 | |
run: | | |
origin=https://github.com/PB-pobing/pobing | |
folder=pobing | |
echo $origin to $folder | |
sudo apt install git | |
cd ${GITHUB_WORKSPACE} | |
sudo rm -rf $folder | |
mkdir $folder | |
cd $folder | |
git clone $origin . | |
sudo rm -rf .git | |
mv sy.json sources.json | |
echo 书源来源于$origin>origin.md | |
cd .. | |
git pull --no-edit --ff | |
- name: 提交更新 | |
uses: actions-x/commit@v6 | |
with: | |
message: "更新破冰源" | |
yi-c: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 克隆仓库 | |
run: | | |
origin=https://gitlink.org.cn/yi-c/yd.git | |
folder=yi-c | |
echo $origin to $folder | |
sudo apt install git | |
cd ${GITHUB_WORKSPACE} | |
sudo rm -rf $folder | |
mkdir $folder | |
cd $folder | |
git clone $origin . | |
sudo rm -rf .github .git | |
mv sy.json sources.json | |
mv dy.json subscribe.json | |
echo 书源来源于$origin>origin.md | |
cd .. | |
git pull --no-edit --ff | |
- name: 提交更新 | |
uses: actions-x/commit@v6 | |
with: | |
message: "更新一程、源" | |
april: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 克隆仓库 | |
run: | | |
rm -rf 人间的四月天 | |
mkdir 人间的四月天 | |
cd 人间的四月天 | |
sudo apt install unzip curl wget jq | |
json=$(curl -s "https://lanzouapi.000webhostapp.com/api.php?link=https://xiahanyun.lanzoum.com/b030q8wyj&pwd=1234") | |
filename=$(echo "$json" | jq -r '.data[0].name') | |
url=$(echo "$json" | jq -r '.data[0].url') | |
echo "文件名: $filename" | |
echo "链接: $url" | |
wget -O sy.zip $url | |
unzip sy.zip | |
mv bookSource.json sources.json | |
rm -rf sy.zip | |
echo 来源:https://xiahanyun.lanzoum.com/b030q8wyj 密码:1234>origin.md | |
cd .. | |
git pull --no-edit --ff | |
- name: 提交更新 | |
uses: actions-x/commit@v6 | |
with: | |
message: "更新四月天源" | |
xiu2: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 克隆仓库 | |
run: | | |
origin=https://github.com/XIU2/Yuedu | |
folder=xiu2 | |
echo $origin to $folder | |
sudo apt install git | |
cd ${GITHUB_WORKSPACE} | |
sudo rm -rf $folder | |
mkdir $folder | |
cd $folder | |
git clone $origin . | |
sudo rm -rf .github .nojekyll .gitattributes .git | |
shopt -s extglob | |
sudo rm -rf !(LICENSE|README.md|shuyuan) | |
mv shuyuan sources.json | |
echo 书源来源于$origin>origin.md | |
cd .. | |
git pull --no-edit --ff | |
- name: 提交更新 | |
uses: actions-x/commit@v6 | |
with: | |
message: "更新XIU2源" | |
namofree: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 克隆仓库 | |
run: | | |
origin=https://www.yckceo.com/yuedu/shuyuans/json/id/5.json | |
folder=namofree | |
echo $origin to $folder | |
sudo apt install git wget | |
cd ${GITHUB_WORKSPACE} | |
sudo rm -rf $folder | |
mkdir $folder | |
cd $folder | |
wget $origin -O sources.json | |
echo 书源来源于$origin>origin.md | |
cd .. | |
git pull --no-edit --ff | |
- name: 提交更新 | |
uses: actions-x/commit@v6 | |
with: | |
message: "更新namofree源" | |
bsxq: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 克隆仓库 | |
run: | | |
origin=https://www.yckceo.com/yuedu/shuyuans/json/id/8.json | |
folder=不世玄奇 | |
echo $origin to $folder | |
sudo apt install git wget | |
cd ${GITHUB_WORKSPACE} | |
sudo rm -rf $folder | |
mkdir $folder | |
cd $folder | |
wget $origin -O sources.json | |
echo 书源来源于$origin>origin.md | |
cd .. | |
git pull --no-edit --ff | |
- name: 提交更新 | |
uses: actions-x/commit@v6 | |
with: | |
message: "更新不世玄奇源" |