Skip to content

Commit

Permalink
rebuild tgui only if there is difference between starting and ending …
Browse files Browse the repository at this point in the history
…point
  • Loading branch information
Vladisvell committed Dec 22, 2024
1 parent a99a943 commit 523f71d
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/testmerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
type: boolean
required: true
default: false

env:
BASE_BRANCH: master220
TESTMERGE_BRANCH: testmerge
Expand Down Expand Up @@ -109,6 +109,7 @@ jobs:
git config --local user.name "Testmerge Worker"
git switch ${{ env.TESTMERGE_BRANCH }} || git switch -c ${{ env.TESTMERGE_BRANCH }}
git reset --hard ${{ env.BASE_BRANCH }}
PRE_TESTMERGE_SHA=$(git rev-parse HEAD)
./tools/hooks/install.sh
./tgui/bin/tgui --install-git-hooks
Expand Down Expand Up @@ -158,28 +159,30 @@ jobs:
git config --local user.name "Changelog Generation"
git commit -m "Automatic changelog generation"
fi
# Generate TGUI bundle
./tgui/bin/tgui
CHANGES=$(git diff | wc -l)
POST_TESTMERGE_SHA=$(git rev-parse HEAD)
CHANGES=$(git diff $POST_TESTMERGE_SHA $PRE_TESTMERGE_SHA ./tgui | wc -l)
if [ "$CHANGES" -gt 0 ] ; then
./tgui/bin/tgui
git config --local user.email "[email protected]"
git config --local user.name "TGUI bundle Generation"
git commit -am "Testmerge TGUI bundle build generation"
fi
git push -f origin ${{ env.TESTMERGE_BRANCH }}
if [ ${{ inputs.apply_to_stable }} ] ; then
git fetch origin ${{ env.STABLE_BRANCH }}
git push -f --set-upstream origin ${{ env.TESTMERGE_BRANCH }}:${{ env.STABLE_BRANCH}}
fi
# Output the list of merged PRs
echo "${MERGED_PRS[@]}"
echo "merged_prs=${MERGED_PRS[@]}" >> $GITHUB_OUTPUT
echo "END"
#- name: Comment on merged PRs
# uses: actions/github-script@v7
# with:
Expand Down

0 comments on commit 523f71d

Please sign in to comment.