Skip to content

Commit 06ff68d

Browse files
authored
fixes: check for change
1 parent 14b5222 commit 06ff68d

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.github/workflows/generate-project-list.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,19 @@ jobs:
4848
sed -i "/$file/d" PROJECTS.md
4949
done
5050
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+
5954
- name: Commit project list
6055
run: |
6156
git config --global user.email "github-actions[bot]@users.noreply.github.com"
6257
git config --global user.name "github-actions[bot]"
6358
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
6665
env:
6766
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
68-

0 commit comments

Comments
 (0)