Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 2

Is there a way to access action duration/completion time when action completes

My team and I have a workflow and one nice feature many other CI/CD tools have is the ability to output the duration of a "build". Can someone give me a shove in the right direction to the documentation for this? I couldn't seem to find it or any examples in the wild. Obviously I could store a timestamp and the start and at the end and do the math. I was just wondering if it's something that is available.

1 Reply
Highlighted
GitHub Staff
Message 2 of 2

Re: Is there a way to access action duration/completion time when action completes

We have an API coming soon that will expose that information.

 

You'll be able to grab an array with each step's timestamps.

 

        {
          "name": "Name of the step",
          "status": "completed",
          "conclusion": "success",
          "number": 4,
          "started_at": "2019-11-13T10:25:04.000-08:00",
          "completed_at": "2019-11-13T10:25:05.000-08:00"
        },

There is a couple second delay between when the step in your workflow completes and it's available in the API. So it would need to be grabbed in a subsequent step.