shenjack
e44e4d132c
Some checks failed
自动生成 label / Generate-label (push) Failing after 44s
我的问题( Update label.yml to install dependencies using pip Update git clone URL for python-packs repository Fix git clone URL in label.yml workflow Add ls commands to debug dependency installation Update directory paths in label.yml Update label generation script Add ls commands to label.yml workflow Add ls command to display file details Remove unnecessary code in label.yml Update label.yml and add requirement.txt 不管了! build? mkdir added
54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
name: 自动生成 label
|
|
|
|
# main 分支推送
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
Generate-label:
|
|
runs-on: node-21
|
|
steps:
|
|
- name: 获取仓库
|
|
uses: http://shenjack.top:5100/gitea-server/checkout@v4
|
|
|
|
- name: pip
|
|
run: |
|
|
cd ..
|
|
git clone http://shenjack.top:5100/gitea-server/python-packs.git
|
|
cd python-packs
|
|
python3 -m ensurepip
|
|
cd ../ARS-docs
|
|
|
|
- name: 安装依赖
|
|
run: |
|
|
python3 -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
|
python3 -m pip install -U pip
|
|
python3 -m pip install -U -r scripts/requirement.txt
|
|
ls . -la
|
|
ls scripts
|
|
|
|
- name: 生成 label
|
|
run: |
|
|
python3 scripts/parse-label.py
|
|
|
|
- name: 检查是否有改动
|
|
run: |
|
|
git config user.name gitea-actions
|
|
git config user.email gitea-action@shenjack.top
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
git add .
|
|
git commit -m "gen by python script"
|
|
# 创建并切换到deploy分支
|
|
git checkout -b deploy
|
|
# 将更改添加到deploy分支的最新提交
|
|
git commit --amend --no-edit
|
|
# 推送到deploy分支
|
|
git push origin HEAD --force
|
|
else
|
|
echo "工作区没有改动"
|
|
fi
|
|
|
|
# https://gitea.com/actions/gitea-release-action
|