GooGoo 不要慌太阳下山有月光 #68
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: Update Music List | |
on: | |
push: | |
branches: | |
- custom | |
workflow_dispatch: | |
branches: | |
- custom | |
jobs: | |
update_music_list: | |
runs-on: ubuntu-latest | |
# 当仓库隶属组织时,赋予流水线“写权限”以便提交变更 | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: custom | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: pip install -r py/requirements.txt | |
- name: Run update_music_list.py | |
run: | | |
export ignores="经典老歌,苗苗,苏乔,纯音乐,其他,茗记,游戏,歌手专辑,高达,犬夜叉,死神,宫崎骏,董贞,进击的巨人,柯南,海贼王,哆啦,刀剑,倚天屠龙记,凡人,从零,高达,一念永恒,见或不见,羁绊,求婚,分飞,生日,鹿鼎记,义海豪情,东成西就,步步惊心,爸爸,那些年,东城西就,女孩,生日,张子枫,旧戏,泰坦,封神演义,Kotoko,ユナイト,哀と悲,失落之塔,半生雪,吹灭小山河,混沌,尘劫,3月9日,萱草花,大时代,爱情公寓,永别京华,红尘,粗面鱼腩,笼,吴观辰,林一,花粥" | |
python py/gen_music_list.py -i "${ignores}" | |
# python py/gen_music_list.py -i "${{ vars.ignores }}" | |
- name: Check for changes | |
id: changes | |
run: | | |
if git diff --name-only | grep -q "music_list_"; then | |
echo "::set-output name=has_changes::true" | |
else | |
echo "::set-output name=has_changes::false" | |
fi | |
- name: Commit and push changes | |
if: steps.changes.outputs.has_changes == 'true' | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add -A | |
git commit -m "Update music list" | |
git push |