Skip to content

Remove directory restriction for (reusable) workflows #2102

@flobernd

Description

@flobernd

Describe the enhancement

Currently all workflows must be rooted in the .github/workflows directory. With that restriction it's not possible to use subdirectories to organize your workflows.

While this might seem like a minor issue, it got a lot more annoying with the introduction of reusable workflows. Many companies are maintaining repositories with the single purpose to hold all of their standard workflows. This often includes workflows for multiple programming languages.

It would be really great if we could use subdirectories like .github/workflows/{lang} instead of being forced to use {lang}-build.yaml names.

It would as well be great if reusable workflows (I see the need to enforce it for regular workflows) are allowed to be rooted in any directory outside of .github/workflows. This would make the directory structure of "workflow repositories" way more intuitive.

This change would be completely backwards compatible as the current syntax for calling workflows by relative pathes require you to use the complete path relative to $GITHUB_WORKSPACE anyways:

uses: ./github/workflows/target.yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions