Access git log data from GitHub Actions ?


I’m trying to retrieve the git log data during my workflow but it does not seem to be available.

I tried it in different ways :

  • directly within my worklfow by using a simple run step

  • by creating a custom action, using Docker and running a .sh script inside the docker image.

With both solutions, the output of the git log command is empty (whereas it works correctly when I run it locally from my terminal).

Would there be any restrictions about this git command ?

Thank you for your feedback about this topic.

I’ve been stuck on this during the whole day, it’s driving me crazy !! ahahah

When you use a simple run step, could you share the whole workflow yml file ? Do you have a checkout step? Also, could you please share the logs of your workflow run? 

 There is my sample: 

git log.png

The git log shows the latest commit: 

1 Like

Hi buddy,

I am facing a similar issue wherein the git log data on actions only displays the last commit, whereas using on my local it shows a bunch of commits (local is correct)

logs here - Update .new35 · shreyanshp/gitops@cee0c13 · GitHub