vscode-github-actions icon indicating copy to clipboard operation
vscode-github-actions copied to clipboard

Syntax highlighting for repos that put composite workflows in directories other than `.github`

Open alexrosenfeld10 opened this issue 2 years ago • 6 comments

Is your feature request related to a problem? Please describe. It's often nice to put shared workflows in directories that make sense for consumers, like my-private-org/composite/some-team-name/their-reusable-workflow.yml. The extension works fine for resolving these workflows when they're used, but it doesn't syntax highlight or do anything when authoring these workflows. It seems to pay attention to .github/**/*.yml exclusively.

Describe the solution you'd like Configurable paths and options for which files should be parsed.

Additional context Add any other context or screenshots about the feature request here.

alexrosenfeld10 avatar Mar 30 '23 18:03 alexrosenfeld10

Right now I'm just doing this as a workaround, which offers way less functionality:

{
    "yaml.schemas": {
        "https://json.schemastore.org/github-action.json": [
            "composites/**/*.y*ml",
            "packages/*-action/action.yml"
        ]
    }
}

alexrosenfeld10 avatar Mar 30 '23 18:03 alexrosenfeld10

(btw, dependabot has the same problem. I opened up a sibling issue for it https://github.com/dependabot/dependabot-core/issues/6949)

alexrosenfeld10 avatar Mar 30 '23 18:03 alexrosenfeld10

+1

This could be configurable: https://github.com/github/vscode-github-actions/blob/main/src/workflow/documentSelector.ts#L2

:)

sprymiker avatar Jul 09 '23 09:07 sprymiker

Best as i can tell, composite actions aren't supported whatsoever, regardless of their path. #46 is an issue for this.

For anyone who wants to use alexrosenfeld10's workaround, I figured out you need to have redhat.vscode-yaml installed

I cannot fathom how this isn't a priority, given composite actions are probably used more often than other types.

dhorkin avatar Sep 27 '23 00:09 dhorkin

The original issue and subsequent comments are a little confusing. Is this issue supposed to be about composite actions, or about re-usable workflows?

Reusable workflows can only be in .github/workflows/ (and not even in any subdirectories).

Composite actions can be anywhere (even outside of .github/) but the file must be named action.yml so the their-reusable-workflow.yml file name in the example doesn't make sense I think.

briantist avatar Sep 27 '23 00:09 briantist

Bumping this, looks like it was added to MP4 but that issue has been closed and it may have orphaned this one?

baxterjo avatar Sep 23 '24 19:09 baxterjo