Skip to content

Commit c1de7db

Browse files
committed
fix: exit successfully if no changes
1 parent d0fc5fd commit c1de7db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/update-chains.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,16 @@ jobs:
3939
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
4040
git checkout -b $BRANCH_NAME
4141
git add -A
42+
if git diff-index --quiet HEAD --; then
43+
echo "No changes to commit"
44+
exit 0
45+
fi
4246
git commit -m 'Update chains data'
4347
git push origin $BRANCH_NAME
48+
echo "CHANGES=true" >> $GITHUB_ENV
4449
4550
- name: Create Pull Request
51+
if: env.CHANGES == 'true'
4652
uses: peter-evans/create-pull-request@v3
4753
with:
4854
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)