I am planning to create a workflow on a PR that will get the yaml file in the PR (only one such file should be in the PR) find all the previous versions of the file and invoke a java app that validates the new file against all the older versions for compatibility and automatically merges the PR if validation is successful.
I am getting familiar with invoking actions at this time. My the questions are:
- What git API I can use to get the content of all the versions as described above
- What is the best practice of passing these to an application that is triggered by the action? I need to create two arguments - one is an array of strings each element containing the content of the older versions and the second one is a string that is the new version.
Is there any sample workflow that I can look at to understand what the steps are?
Thanks for any help.