Skip to content

Consider using make to ease DRY violations in GitHub Actions workflows #146

@edburns

Description

@edburns

Looking at this PR I can't help but notice there is some common, yet complicated, logic in the workflows regarding entitlement checks. It might make sense to adopt the following process to ease maintenance of this logic.

  1. Use a Makefile (or similar) to cause the various .yml files to be assembled such that the duplicate logic is templated from one source file into several .yml files. For example, I observe the logic in Deploy VM using image for evaluation usage is in at least two .yml` files.
  2. Adopt the policy that when making changes to the workflows, the human makes the changes in the file(s) that serve as input to make and then runs make before committing the work to git.
  3. Put sufficient warning is the .yml files that are generated by make advising future humans to not edit the files directly, but rather to edit whatever source files go in to make.
    Of course, you don't have to use make. Any templating system would work. Perhaps even shell scripts.

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