Skip to content

Commit

Permalink
Default to lookback 2 days
Browse files Browse the repository at this point in the history
  • Loading branch information
kwk committed Dec 17, 2024
1 parent c1504d8 commit 4c86fad
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/actions/generate-matrix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
default: "all"
lookback_days:
description: "A JSON list of integers for how many days to look back. \"[0]\" means just today."
default: "[0]"
default: "[0,1,2]"
outputs:
matrix:
description: "The build matrix to use in consequential jobs"
Expand Down Expand Up @@ -67,5 +67,8 @@ runs:
fi
LOOKBACK_DAYS="${{ inputs.lookback_days }}"
if [[ $(echo "$LOOKBACK_DAYS" | tr -d '[:space:]') == "" ]]; then
LOOKBACK_DAYS="[0,1,2]"
fi
echo "myoutput=$(jq -cn --argjson includes "$INCLUDES" --argjson names "$NAMES" --argjson lookback_days "$LOOKBACK_DAYS" '{name: $names, today_minus_n_days: $lookback_days, include:$includes}')" >> $GITHUB_OUTPUT
6 changes: 5 additions & 1 deletion .github/workflows/check-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
description: 'year month day'
required: true
type: string
lookback_days:
description: "A JSON list of integers for how many days to look back. \"[0]\" means just today."
default: "[0]"
type: string
strategy:
description: 'build strategy'
required: true
Expand All @@ -38,7 +42,7 @@ jobs:
id: set-matrix
with:
strategy: ${{ inputs.strategy }}
lookback_days: "[0,1,2]"
lookback_days: ${{ inputs.lookback_days }}
check-snapshot:
needs: generate-matrix
strategy:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/fedora-copr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
id: set-matrix
with:
strategy: ${{ inputs.strategy }}
lookback_days: "[0]"

build-on-copr:
needs: generate-matrix
Expand Down

0 comments on commit 4c86fad

Please sign in to comment.