Skip to content

Commit 3089ba5

Browse files
authored
refactor: added a condition
1 parent 02177bc commit 3089ba5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/99-self-healing-dependabot-updates.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,18 @@ jobs:
5353
run: |
5454
npm run codestyle
5555
56+
- name: 🚦 Check for changes before committing
57+
id: check_changes
58+
run: |
59+
if [[ -z "$(git status --porcelain)" ]]; then
60+
echo "No changes to commit. Skipping auto-commit step."
61+
echo "changes_detected=false" >> $GITHUB_ENV
62+
else
63+
echo "Changes detected. Proceeding to auto-commit step."
64+
echo "changes_detected=true" >> $GITHUB_ENV
65+
5666
- name: 🚘 Auto commit
57-
if: env.stylelint_update == 'true' || env.prettier_update == 'true'
67+
if: steps.check_changes.outputs.changes_detected == 'true' && (env.stylelint_update == 'true' || env.prettier_update == 'true')
5868
uses: ./.github/actions/auto-commit
5969
with:
6070
branch-name: "${{ github.head_ref }}-auto"

0 commit comments

Comments
 (0)