File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -79,23 +79,18 @@ jobs:
7979
8080 echo "Getting commits from date: $TARGET_DATE"
8181
82- # Get commits from the target date (00:00 to 23:59 UTC)
83- COMMITS =$(git log --since="$TARGET_DATE 00:00:00 UTC" --until="$TARGET_DATE 23:59:59 UTC" --pretty=format:"%H" --reverse )
82+ # Get the last commit from the target date
83+ LAST_COMMIT =$(git log --since="$TARGET_DATE 00:00:00 UTC" --until="$TARGET_DATE 23:59:59 UTC" --pretty=format:"%H" -n 1 )
8484
85- if [ -z "$COMMITS " ]; then
85+ if [ -z "$LAST_COMMIT " ]; then
8686 echo "No commits found for date $TARGET_DATE"
8787 exit 1
8888 else
89- COMMIT_COUNT=$( echo "$COMMITS" | wc -l)
90- FIRST_COMMIT=$( echo "$COMMITS" | head -1)
91- LAST_COMMIT=$( echo "$COMMITS" | tail -1)
89+ echo "Found last commit for date $TARGET_DATE: $LAST_COMMIT"
90+ echo "COMMIT_RANGE=$LAST_COMMIT" >> $GITHUB_ENV
91+ echo "COMMIT_COUNT=1" >> $GITHUB_ENV
9292
93- echo "Found $COMMIT_COUNT commits for date $TARGET_DATE"
94- echo "COMMIT_RANGE=${FIRST_COMMIT}..${LAST_COMMIT}" >> $GITHUB_ENV
95- echo "COMMIT_COUNT=$COMMIT_COUNT" >> $GITHUB_ENV
96-
97- echo "Commits to benchmark:"
98- echo "$COMMITS"
93+ echo "Commit to benchmark: $LAST_COMMIT"
9994 fi
10095
10196 - name : Print environment variables
You can’t perform that action at this time.
0 commit comments