@@ -36,16 +36,19 @@ jobs:
36
36
git fetch origin "$BASE_BRANCH"
37
37
38
38
# Allow merge conflicts in `lib`, since rebuilding should resolve them.
39
- git merge "origin/$BASE_BRANCH" || echo "Merge conflicts detected"
39
+ git merge "origin/$BASE_BRANCH" || echo "Merge conflicts detected, continuing... "
40
40
41
41
# Check for merge conflicts outside of `lib`. Disable git diff's trailing whitespace check
42
42
# since `node_modules/@types/semver/README.md` fails it.
43
43
if git -c core.whitespace=-trailing-space diff --check | grep --invert-match '^lib/'; then
44
- echo "Merge conflicts detected outside of lib/ directory. Please resolve them manually."
44
+ echo "Merge conflicts were detected outside of the lib directory. Please resolve them manually."
45
45
git -c core.whitespace=-trailing-space diff --check | grep --invert-match '^lib/' || true
46
46
exit 1
47
47
fi
48
48
49
+ echo "No merge conflicts found outside the lib directory. We should be able to resolve all of" \
50
+ "these by rebuilding the Action."
51
+
49
52
- name : Compile TypeScript
50
53
run : |
51
54
npm install
@@ -70,18 +73,24 @@ jobs:
70
73
BRANCH : ${{ github.event.pull_request.head.ref || github.event.ref }}
71
74
run : |
72
75
if [ ! -z "$(git status --porcelain)" ]; then
76
+ echo "Changes detected, pushing them to branch $BRANCH"
73
77
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
74
78
git config --global user.name "github-actions[bot]"
75
79
git add --all
76
80
# If the merge originally had conflicts, finish the merge.
77
81
# Otherwise, just commit the changes.
78
82
if git rev-parse --verify MERGE_HEAD >/dev/null 2>&1; then
83
+ echo "In progress merge detected, finishing it up."
79
84
git merge --continue
80
85
else
86
+ echo "No in-progress merge detected, committing changes."
81
87
git commit -m "Rebuild"
82
88
fi
89
+ echo "Pushing changes to branch $BRANCH"
83
90
git push origin "HEAD:$BRANCH"
84
91
echo "changes=true" >> $GITHUB_OUTPUT
92
+ else
93
+ echo "No changes detected, nothing to commit."
85
94
fi
86
95
87
96
- name : Notify about rebuild
0 commit comments