Skip to content

Commit

Permalink
Update calculate-build-duration.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
joshjohanning committed Jun 21, 2024
1 parent 50e272f commit ba7dfd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/calculate-build-duration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: |
JOB_URL="${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs"
JOB_JSON=$(curl -s -H "Authorization: token $GITHUB_TOKEN" $JOB_URL)
START_TIME=$(echo $JOB_JSON | jq -r '.jobs[] | select(.name == "build") | .started_at' | xargs -I {} date -j -f "%Y-%m-%dT%H:%M:%SZ" "{}" +%s)
START_TIME=$(echo $JOB_JSON | jq -r '.jobs[] | select(.name == "build") | .started_at' | xargs -I {} date -d {} +%s)
END_TIME=$(date +%s)
DURATION_SECONDS=$(( (END_TIME - START_TIME) ))
DURATION_MINUTES=$(( (END_TIME - START_TIME) / 60 ))
Expand Down

0 comments on commit ba7dfd6

Please sign in to comment.