Skip to content

Commit 8c224a3

Browse files
committed
Merge remote-tracking branch 'origin/main' into 2.0
2 parents 69c771e + 56fcab6 commit 8c224a3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/CI-Client.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,27 @@ jobs:
2525
- name: Run build
2626
run: yarn build
2727
- name: Push build files to GitHub
28+
shell: bash
2829
run: |
2930
set -ex
3031
31-
if [[ "$GITHUB_REF" != 'refs/heads/main' && "$GITHUB_REF" != 'refs/heads/1.0' && "$GITHUB_REF" != 'refs/heads/2.0' ]]; then
32+
BASE_BRANCH_PATTERN="^refs\/heads\/(main|[0-9]+\.[0-9])$"
33+
if ! [[ "$GITHUB_REF" =~ $BASE_BRANCH_PATTERN ]]; then
3234
echo "not pushing because ref is $GITHUB_REF"
3335
exit 0
3436
fi
3537
38+
set +e
3639
git status -s | grep Resources/Public/JavaScript
3740
if [ $? -eq 0 ]; then
41+
set -e
3842
git config --global user.name "github-actions[bot]"
3943
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
4044
git add -f Resources/Public/JavaScript
41-
git commit -m "Update: Build frontend files"
45+
git commit -m "Update: Build frontend files for $GITHUB_SHA on $GITHUB_REF_NAME"
4246
git push
4347
else
48+
set -e
4449
echo "No changes since last run"
4550
fi
4651

0 commit comments

Comments
 (0)