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 e7dd445 commit 1a31005
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/calculate-build-duration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ jobs:
JOB_CONTEXT: ${{ toJSON(job) }}
run: echo "$JOB_CONTEXT"

- run: sleep 5s
- run: sleep 120s

- name: Calculate build duration
run: |
END_TIME=$(date +%s)
START_TIME=${{ steps.set-start-time.outputs.start_time }}
DURATION=$((END_TIME - START_TIME))
echo "Build duration: $DURATION seconds"
END_TIME=$(date +%s)
DURATION_SECONDS=$((END_TIME - START_TIME))
DURATION_MINUTES=$((DURATION_SECONDS / 60))
echo "Build duration (in seconds): $DURATION_SECONDS second(s)"
echo "Build duration (in minutes): $DURATION_MINUTES minute(s)"

0 comments on commit 1a31005

Please sign in to comment.