Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
edburns opened this issue Feb 26, 2022 · 0 comments
Open

Comments

@edburns
Copy link
Collaborator

edburns commented Feb 26, 2022

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant