diff --git a/.github/workflows/calculate-build-duration.yml b/.github/workflows/calculate-build-duration.yml index 862f261..b23f3f9 100644 --- a/.github/workflows/calculate-build-duration.yml +++ b/.github/workflows/calculate-build-duration.yml @@ -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 ))