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

How to use this extension?

Open sanmai-NL opened this issue 5 years ago • 3 comments

Thanks for the extension. Seems very useful.

I can't find any documentation on how to use it yet.

sanmai-NL avatar May 15 '20 13:05 sanmai-NL

Once you have the RedHat YAML Language Server installed you can add the following to your user settings.json to get the syntax highlighting to work.

I think since v3 of this extension it uses the RedHat Language Server anyways and not its own schema.

"files.associations": {
    // GitHub Actions
    "action.yaml": "yaml",
    "**/.github/workflows/*.yaml": "yaml",
    "**/.github/workflows/*.yml": "yaml"
}

"yaml.schemas": {
        "http://json.schemastore.org/github-workflow": [
            "**/.github/workflows/*.yaml",
            "**/.github/workflows/*.yml"
        ],
        "http://json.schemastore.org/github-action": [
            "action.yaml",
            "action.yml"
        ]
}

As for for other features, 🤷 I'm still trying to figure that out.

MAHDTech avatar May 24 '20 07:05 MAHDTech

You do not need this extension - YAML by Red Hat does all things for syntax highlighting and autocomplete in .yml files, including the GitHub Workflow.

almaceleste avatar Nov 30 '20 16:11 almaceleste

I still need

{
    "yaml.schemas": {
        "http://json.schemastore.org/github-workflow": [
            "**/.github/workflows/*.yaml",
            "**/.github/workflows/*.yml"
        ],
        "http://json.schemastore.org/github-action": [
            "action.yaml",
            "action.yml"
        ]
    },
}

in settings.json when using the Red Hat YAML extension.

That is, neither this extension nor Red Hat YAML seems to be enabling GitHub Actions YAML schema by default

MetRonnie avatar Aug 23 '21 17:08 MetRonnie