在 GitHub Actions 工作流程中,我们多次尝试使用此命令获取由推送的提交更改的文件的文件名run: git diff-tree --no-commit-id --name-only -r ${{ github.sha }}。但它总是只返回以下日志,不给出文件名或带路径的文件名。请参见下图。
run: git diff-tree --no-commit-id --name-only -r ${{ github.sha }}
关于 Runner 类型: ubuntu-latest,它不是自托管运行器。
ubuntu-latest
git github github-actions
git ×1
github ×1
github-actions ×1