File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -48,21 +48,19 @@ jobs:
48
48
sed -i "/$file/d" PROJECTS.md
49
49
done
50
50
51
- - name : Check for changes
52
- run : |
53
- git diff --exit-code -- PROJECTS.md
54
- if [ $? -eq 0 ]; then
55
- echo "No changes detected, exiting."
56
- exit 0
57
- fi
58
-
51
+ # Debug output to check the content of PROJECTS.md
52
+ cat PROJECTS.md
53
+
59
54
- name : Commit project list
60
55
run : |
61
56
git config --global user.email "github-actions[bot]@users.noreply.github.com"
62
57
git config --global user.name "github-actions[bot]"
63
58
git add PROJECTS.md
64
- git commit -m "Update project list"
65
- git push --force-with-lease
59
+ if ! git diff --cached --exit-code; then
60
+ git commit -m "Update project list"
61
+ git push --force-with-lease
62
+ else
63
+ echo "No changes to commit."
64
+ fi
66
65
env :
67
66
GITHUB_TOKEN : ${{ secrets.ACTION_TOKEN }}
68
-
You can’t perform that action at this time.
0 commit comments