Skip to content

Commit 28febf0

Browse files
committed
build: fix change detection
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 18794bf commit 28febf0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/update_contributors.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,15 @@ jobs:
7878
run: |
7979
make update-contributors
8080
81-
if [[ -z "$(git status --porcelain)" ]]; then
81+
# Stage *all* tracked and untracked changes first…
82+
git add -A
83+
84+
# If the index is identical to HEAD, nothing real changed:
85+
if git diff --cached --quiet; then
8286
echo "No changes to commit."
8387
echo "changed=false" >> $GITHUB_OUTPUT
8488
else
89+
echo "Changes detected."
8590
echo "changed=true" >> $GITHUB_OUTPUT
8691
fi
8792
@@ -129,6 +134,7 @@ jobs:
129134

130135
# Create a pull request summary:
131136
- name: 'Create summary'
137+
if: steps.update-contributors.outputs.changed == 'true'
132138
run: |
133139
echo "# :tada: Pull Request created! :tada:" >> $GITHUB_STEP_SUMMARY
134140
echo "" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)