File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,13 +139,14 @@ jobs:
139139 OUTPUT_FILE="${{ inputs.output_file }}"
140140 echo "🔎 Checking git-tracked changes for $OUTPUT_FILE and CONTRIBUTING.md..."
141141
142- # Vérifie si CONTRIBUTING.md existait avant le téléchargement
143- if [ ! -f CONTRIBUTING.md ] || ! git ls-files --error-unmatch CONTRIBUTING.md >/dev/null 2>&1; then
144- echo "⚠️ CONTRIBUTING.md did not exist in the repo before. Forcing PR creation."
142+ # Vérifie si CONTRIBUTING.md existait dans le repo avant le workflow
143+ if ! git ls-files --error-unmatch CONTRIBUTING.md >/dev/null 2>&1; then
144+ echo "⚠️ CONTRIBUTING.md did not exist in the repo before. Will create PR."
145+ git add "$OUTPUT_FILE" CONTRIBUTING.md
145146 echo "changed=true" >> $GITHUB_OUTPUT
146147 else
147- # On force git à détecter les fichiers comme modifiés
148- git add --intent-to-add "$OUTPUT_FILE" CONTRIBUTING.md 2>/dev/null || true
148+ # Ajoute les fichiers modifiés ou remplacés
149+ git add "$OUTPUT_FILE" CONTRIBUTING.md
149150
150151 if git diff --cached --quiet; then
151152 echo "✅ No changes detected in README or CONTRIBUTING.md."
You can’t perform that action at this time.
0 commit comments