我在./github/workflows/
目录下有3个文件夹:
- linters
- functionalTests
- unitTests
每个文件夹内都有多个工作流程的.yml
文件。例如:linters/codeQuality.yml
我的问题是,当提交一个拉取请求时,只有根目录中的工作流程文件会被执行,而不是这些文件夹中的工作流程文件。
我该如何解决这个问题?
我在./github/workflows/
目录下有3个文件夹:
每个文件夹内都有多个工作流程的.yml
文件。例如:linters/codeQuality.yml
我的问题是,当提交一个拉取请求时,只有根目录中的工作流程文件会被执行,而不是这些文件夹中的工作流程文件。
我该如何解决这个问题?
你不能从子目录运行工作流:
你必须将工作流文件存储在仓库的
.github/workflows
目录中。
.github/workflows/workflow.yaml
[...]
jobs:
myJob:
name: My Job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/linters/codeQuality
[...]
.github/workflows/linters/codeQuality/action.yaml
name: "My composite action"
description: "Checks out the repository and does something"
runs:
using: "composite"
steps:
- run: |
echo "Doing something"
[other steps...]