From 1587d59ddce88445b7e7b147637ad9efc9ac49aa Mon Sep 17 00:00:00 2001 From: iphydf Date: Thu, 7 Nov 2024 20:49:43 +0000 Subject: [PATCH] fix: Don't abort the restyled workflow before uploading a patch. --- .github/workflows/common-ci.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/common-ci.yml b/.github/workflows/common-ci.yml index d9c8eb5..1ed6f2d 100644 --- a/.github/workflows/common-ci.yml +++ b/.github/workflows/common-ci.yml @@ -22,8 +22,13 @@ jobs: - uses: restyled-io/actions/setup@v4 - id: restyler uses: restyled-io/actions/run@v4 - with: - fail-on-differences: true + + - name: Copy patch to staged artifact + if: ${{ steps.restyler.outputs.patch }} + run: | + cat >>/tmp/restyled.diff <<'EOM' + ${{ steps.restyler.outputs.patch }} + EOM - id: upload uses: actions/upload-artifact@v4 @@ -31,3 +36,15 @@ jobs: path: /tmp/restyled.diff if-no-files-found: ignore overwrite: true + + - name: Print patch instructions + if: ${{ steps.upload.outputs.artifact-url }} + run: | + cat >>"$GITHUB_STEP_SUMMARY" <<'EOM' + ## Restyled + + To apply these fixes locally, run: + + curl '${{ steps.upload.outputs.artifact-url }}' | unzip -p - restyled.diff | git am + + EOM