Skip to content

How to reuse scripts - Yaml import/require #245

@Vadorequest

Description

@Vadorequest

I looked at the documentation and couldn't find any way to reuse code with GitHub Actions.

Let's say I have two different .yml files in my .github/workflows/ folder, one per environment (staging, prod), how can I reuse parts of the common logic without duplicating the configuration?

Yaml/yml doesn't handle imports natively, but maybe there is an alternative?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions