File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -161,21 +161,22 @@ jobs:
161161 - name : Check for changes to versioned files
162162 id : built-file-check
163163 run : |
164- diff_output=$(git diff)
165- if [ -n "$diff_output" ]; then
166- echo "uncommitted_changes=$diff_output" >> "$GITHUB_OUTPUT"
164+ if git diff --quiet; then
165+ echo "uncommitted_changes=false" >> "$GITHUB_OUTPUT"
166+ else
167+ echo "uncommitted_changes=true" >> "$GITHUB_ENV"
167168 fi
168169
169170 - name : Stage changes
170- if : ${{ steps.built-file-check.outputs.uncommitted_changes != ' ' }}
171+ if : ${{ steps.built-file-check.outputs.uncommitted_changes == 'true ' }}
171172 run : git add .
172173
173174 - name : Commit changes
174- if : ${{ steps.built-file-check.outputs.uncommitted_changes != ' ' }}
175+ if : ${{ steps.built-file-check.outputs.uncommitted_changes == 'true ' }}
175176 run : |
176177 git commit -m "Automation: Updating built files with changes. [dependabot skip]"
177178
178179 - name : Push changes
179- if : ${{ steps.built-file-check.outputs.uncommitted_changes != ' ' }}
180+ if : ${{ steps.built-file-check.outputs.uncommitted_changes == 'true ' }}
180181 run : git push
181182
You can’t perform that action at this time.
0 commit comments