6767 rebuild-v1-packages :
6868 needs : generate-v1-packages
6969 if : ${{ needs.generate-v1-packages.outputs.matrix != '[]' }}
70- name : v1-${{ matrix.package.name }}-${{ matrix.os }}
70+ name : v1-${{ matrix.package.name }}-${{ matrix.package.version }}-${{ matrix. os }}
7171 continue-on-error : true
7272 strategy :
7373 fail-fast : false
@@ -110,15 +110,15 @@ jobs:
110110 uses : actions/upload-artifact@v4
111111 if : always()
112112 with :
113- name : v1-patch-${{ matrix.package.name }}-${{ matrix.os }}
113+ name : v1-patch-${{ matrix.package.name }}-${{ matrix.package.version }}-${{ matrix. os }}
114114 path : build_info/v1/
115115 if-no-files-found : ignore
116116
117117 - name : Upload diff artifact
118118 uses : actions/upload-artifact@v4
119119 if : always()
120120 with :
121- name : v1-diff-${{ matrix.package.name }}-${{ matrix.os }}
121+ name : v1-diff-${{ matrix.package.name }}-${{ matrix.package.version }}-${{ matrix. os }}
122122 path : build_info/v1/diffs/
123123 if-no-files-found : ignore
124124
@@ -189,6 +189,8 @@ jobs:
189189 steps :
190190 - name : Checkout code
191191 uses : actions/checkout@v4
192+ with :
193+ token : ${{ secrets.GITHUB_TOKEN }}
192194
193195 - uses : prefix-dev/setup-pixi@v0.8.1
194196 with :
@@ -214,8 +216,10 @@ jobs:
214216 continue-on-error : true
215217 run : |
216218 echo "=== Downloaded Diffs ==="
217- find docs/diffs -name "*.html" 2>/dev/null | head -20 || echo "No diffs found"
218- echo "Total diff files: $(find docs/diffs -name "*.html" 2>/dev/null | wc -l)"
219+ find docs/diffs -type f -name "*.html" 2>/dev/null | head -20 || echo "No diffs found"
220+ echo "Total diff files: $(find docs/diffs -type f -name "*.html" 2>/dev/null | wc -l)"
221+ echo "=== Directory structure ==="
222+ find docs/diffs -type d 2>/dev/null || echo "No dirs"
219223
220224 - name : Generate HTML pages
221225 run : |
@@ -227,30 +231,35 @@ jobs:
227231 ls -la docs/
228232 if [ -d "docs/diffs" ]; then
229233 echo "=== Diffs directory ==="
230- ls -la docs/diffs/ | head -20
234+ find docs/diffs -type f | head -30
231235 fi
232236
233- - name : Update remote docs
234- if : github.ref == 'refs/heads/main'
235- run : |
236- REPROR_UPDATE_TOKEN=${{ secrets.GITHUB_TOKEN }} pixi run repror generate-html --update-remote
237-
238237 - name : Commit diffs to repository
239238 if : github.ref == 'refs/heads/main'
240239 run : |
241240 git config user.name "github-actions[bot]"
242241 git config user.email "github-actions[bot]@users.noreply.github.com"
243242
244243 # Add the diffs directory if it exists and has files
245- if [ -d "docs/diffs" ] && [ "$(find docs/diffs -name '*.html' 2>/dev/null | wc -l)" -gt 0 ]; then
244+ if [ -d "docs/diffs" ] && [ "$(find docs/diffs -type f - name '*.html' 2>/dev/null | wc -l)" -gt 0 ]; then
246245 git add docs/diffs/
247- git diff --staged --quiet || git commit -m "Update diffoscope HTML reports"
248- git push || echo "Nothing to push or push failed"
246+ if ! git diff --staged --quiet; then
247+ git commit -m "Update diffoscope HTML reports"
248+ git push
249+ echo "Diffs committed and pushed"
250+ else
251+ echo "No changes to commit"
252+ fi
249253 else
250254 echo "No diff files to commit"
251255 fi
252- env :
253- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
256+
257+ - name : Update remote docs via API
258+ if : github.ref == 'refs/heads/main'
259+ run : |
260+ # Pull latest changes (including diffs we just pushed)
261+ git pull --rebase || true
262+ REPROR_UPDATE_TOKEN=${{ secrets.GITHUB_TOKEN }} pixi run repror generate-html --update-remote
254263
255264 summarize-results :
256265 runs-on : ubuntu-latest
0 commit comments