File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -161,21 +161,22 @@ jobs:
161
161
- name : Check for changes to versioned files
162
162
id : built-file-check
163
163
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"
167
168
fi
168
169
169
170
- name : Stage changes
170
- if : ${{ steps.built-file-check.outputs.uncommitted_changes != ' ' }}
171
+ if : ${{ steps.built-file-check.outputs.uncommitted_changes == 'true ' }}
171
172
run : git add .
172
173
173
174
- name : Commit changes
174
- if : ${{ steps.built-file-check.outputs.uncommitted_changes != ' ' }}
175
+ if : ${{ steps.built-file-check.outputs.uncommitted_changes == 'true ' }}
175
176
run : |
176
177
git commit -m "Automation: Updating built files with changes. [dependabot skip]"
177
178
178
179
- name : Push changes
179
- if : ${{ steps.built-file-check.outputs.uncommitted_changes != ' ' }}
180
+ if : ${{ steps.built-file-check.outputs.uncommitted_changes == 'true ' }}
180
181
run : git push
181
182
You can’t perform that action at this time.
0 commit comments