Skip to content

Commit

Permalink
chore(ci): Fix baseline SHA default for new weekly schedule (#21980)
Browse files Browse the repository at this point in the history
Was still looking for the SHA from 24 hours ago.

Signed-off-by: Jesse Szwedko <[email protected]>
  • Loading branch information
jszwedko authored Dec 7, 2024
1 parent 9d498fc commit d4854de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# The workflow accepts two optional inputs:
# - The baseline SHA:
# - If not specified, the SHA from 24 hours ago on origin/master is used.
# - If not specified, the SHA from 7 days ago on origin/master is used.
# - The comparison SHA:
# - If not specified, the current HEAD of origin/master is used.
#
Expand All @@ -26,7 +26,7 @@ on:
workflow_dispatch:
inputs:
baseline-sha:
description: "The SHA to use as the baseline (optional). If not provided, it defaults to the SHA from 24 hours ago."
description: "The SHA to use as the baseline (optional). If not provided, it defaults to the SHA from 7 days ago."
required: false
comparison-sha:
description: "The SHA to use for comparison (optional). If not provided, it defaults to the current HEAD of the origin/master branch."
Expand Down Expand Up @@ -59,8 +59,8 @@ jobs:
run: |
# Set baseline SHA
if [ -z "${{ github.event.inputs.baseline-sha }}" ]; then
BASELINE_SHA=$(git rev-list -n 1 --before="24 hours ago" origin/master)
echo "Using baseline SHA from 24 hours ago: ${BASELINE_SHA}"
BASELINE_SHA=$(git rev-list -n 1 --before="7 days ago" origin/master)
echo "Using baseline SHA from 7 days ago: ${BASELINE_SHA}"
else
BASELINE_SHA="${{ github.event.inputs.baseline-sha }}"
echo "Using provided baseline SHA: ${BASELINE_SHA}"
Expand Down

0 comments on commit d4854de

Please sign in to comment.