Mirrowel commited on
Commit
fd65a88
·
1 Parent(s): 9fc445f

ci: Correct grep pattern in build count logic to prevent step failure - yay for more actions fuckery

Browse files
Files changed (1) hide show
  1. .github/workflows/build.yml +3 -1
.github/workflows/build.yml CHANGED
@@ -80,7 +80,9 @@ jobs:
80
 
81
  # Find the number of releases already created today for this branch
82
  # We list releases and filter for tags matching "branch/build-YYYY.MM.DD"
83
- BUILD_COUNT=$(gh release list --repo "${{ github.repository }}" --limit 100 | grep "^$BRANCH_NAME/build-$DATE_STAMP" | wc -l)
 
 
84
 
85
  # Increment the build number for the new release
86
  BUILD_NUMBER=$((BUILD_COUNT + 1))
 
80
 
81
  # Find the number of releases already created today for this branch
82
  # We list releases and filter for tags matching "branch/build-YYYY.MM.DD"
83
+ # The grep pattern is corrected and wrapped in a block with `|| true`
84
+ # to prevent its exit code from failing the step when no matches are found.
85
+ BUILD_COUNT=$(gh release list --repo "${{ github.repository }}" --limit 100 | { grep "$BRANCH_NAME/build-$DATE_STAMP" || true; } | wc -l)
86
 
87
  # Increment the build number for the new release
88
  BUILD_NUMBER=$((BUILD_COUNT + 1))