I'd like to create a GitHub Workflow to display all commits pushed to master in the last week (between the current date and the current date minus 7 days).
This is my idea so far:
Get the current date: this is easy, and it was already answered here
Subtract 7 days from the current date: I don't know how to do this yet, in a consistent way.
Obtain the list of commits between these two dates: this can easily be done with the
git log
command as explained here, but how can this be converted in the GitHub Workflow Yaml?
Can I have some suggestion on points 2 and 3? or if there is any easier way to achieve what I need, please tell me.