更新 duya.yml #3
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: Run duya.py script | ||
| id: run-script | ||
| run: | | ||
| # 运行脚本并捕获输出(将换行符替换为空格) | ||
| output=$(python duya.py 2>&1 | tr '\n' ' ') # 关键:去掉换行符 | ||
| # 设置输出变量(确保单行格式) | ||
| echo "result=$output" >> $GITHUB_OUTPUT | ||
| # 将结果写入文件(保留原始格式,不影响) | ||
| echo "$output" > subscription.txt | ||