@@ -28,25 +28,35 @@ jobs:
2828 git submodule update --remote --recursive
2929 - name : Generate Branch Name
3030 id : git-branch
31+ env :
32+ FORMATTED_TIME : ${{ steps.current-time.outputs.formattedTime }}
3133 run : |
32- echo "::set-output name= branch:: spec_update_${{ steps.current-time.outputs.formattedTime }} "
34+ echo "branch= spec_update_${FORMATTED_TIME}" >> "$GITHUB_OUTPUT "
3335 - name : Generate Num Diffs
3436 id : git-diff-num
3537 run : |
3638 diffs=$(git diff --submodule spec | grep ">" | wc -l)
3739 echo "Number of Spec diffs: $diffs"
38- echo "::set-output name= num-diff:: $diffs"
40+ echo "num-diff= $diffs" >> "$GITHUB_OUTPUT "
3941 - name : Generate Diff
4042 id : git-diff
43+ env :
44+ NUM_DIFF : ${{ steps.git-diff-num.outputs.num-diff }}
4145 run : |
4246 cd spec
43- gitdiff=$(git log -n ${{ steps.git-diff-num.outputs.num-diff }} --pretty="format:%n %H %n%n %b")
47+ gitdiff=$(git log -n "$NUM_DIFF" --pretty="format:%n %H %n%n %b")
4448 commit="Automated Spec Update $gitdiff"
45- commit="${commit//'%'/'%25'}"
46- commit="${commit//$'\n'/'%0A'}"
47- commit="${commit//$'\r'/'%0D'}"
48- echo "Commit Message: $commit"
49- echo "::set-output name=commit::$commit"
49+ while true; do
50+ delimiter="SPEC_UPDATE_EOF_$(python -c 'import uuid; print(uuid.uuid4())')"
51+ if ! grep -Fxq "$delimiter" <<< "$commit"; then
52+ break
53+ fi
54+ done
55+ {
56+ printf 'commit<<%s\n' "$delimiter"
57+ printf '%s\n' "$commit"
58+ printf '%s\n' "$delimiter"
59+ } >> "$GITHUB_OUTPUT"
5060 cd ..
5161 - name: Generate New Routes
5262 run: |
0 commit comments