Skip to content

Commit 4bd7a37

Browse files
committed
chore(ci): fix CI testing logic
the test branch name doesn't match the expected regex pattern
1 parent 2bb43bd commit 4bd7a37

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/workflows/benchmark-release.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,28 @@ jobs:
2222
node-version: '20.18.1'
2323
cache: 'yarn'
2424

25-
# - name: Install dependencies
26-
# run: yarn install --frozen-lockfile
25+
- name: Install dependencies
26+
run: yarn install --frozen-lockfile
2727

2828
- name: Get Previous Release
2929
id: previous_release
3030
run: |
3131
# Parse current season and year from branch name
32-
echo "GITHUB_REF: $GITHUB_REF"
33-
[[ "$GITHUB_REF" =~ ^(winter|spring|summer)([0-9]+)$ ]]
34-
echo "BASH_REMATCH: $BASH_REMATCH"
35-
season="${BASH_REMATCH[1]}"
36-
year="${BASH_REMATCH[2]}"
32+
if [[ "$GITHUB_REF_NAME" =~ ^(winter|spring|summer)([0-9]+)$ ]]; then
33+
season="${BASH_REMATCH[1]}"
34+
year="${BASH_REMATCH[2]}"
35+
else
36+
echo "JUST FOR TESTING"
37+
echo "branch=master" >> "$GITHUB_OUTPUT"
38+
exit 0
39+
fi
40+
3741
3842
# Get previous season and year
3943
case $season in
4044
winter) PREVIOUS="summer$((year - 1))";;
4145
spring) PREVIOUS="winter$year";;
4246
summer) PREVIOUS="spring$year";;
43-
*) PREVIOUS="master";; # Just for testing
4447
esac
4548
# Expose to GitHub Actions
4649
echo "branch=$PREVIOUS" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)