Reputation: 129
I have 3 directories in ./github/workflows/
In each of these directories I have multiple workflow .yml
files for example in linters/codeQuality.yml
My issue is that when a pull request is made then only the workflows files in root are executed and not the workflow files in these diretories.
How can I solve this problem?
Upvotes: 4
Views: 7820
Reputation: 12693
You can't run workflows from subdirectories:
You must store workflow files in the
.github/workflows
directory of your repository.
You can however use composite run steps actions (documentation).
.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...]
Upvotes: 10