Skip to content

Matter Upmerge 1.6 #398

Matter Upmerge 1.6

Matter Upmerge 1.6 #398

Workflow file for this run

name: Restyled
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
restyled:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: restyled-io/actions/setup@f31a2185676c560a98c4f9e0185e9bfe8ec3eaf9 # v4
- id: restyler
uses: restyled-io/actions/run@f31a2185676c560a98c4f9e0185e9bfe8ec3eaf9 # v4
- name: Save restyle patch
if: ${{ steps.restyler.outputs.git-patch }}
env:
PATCH_CONTENT: ${{ steps.restyler.outputs.git-patch }}
run: |
printf '%s\n' "$PATCH_CONTENT" > /tmp/pr-${{ github.event.pull_request.number }}-restyled.patch
echo "Patch saved ($(wc -l < /tmp/pr-${{ github.event.pull_request.number }}-restyled.patch) lines)"
- id: upload
if: ${{ steps.restyler.outputs.git-patch }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: pr-${{ github.event.pull_request.number }}-restyled
path: /tmp/pr-${{ github.event.pull_request.number }}-restyled.patch
if-no-files-found: ignore
overwrite: true
retention-days: 1
- name: Fail if restyle differences found
if: ${{ steps.restyler.outputs.differences == 'true' }}
run: |
echo "::error::Restyle differences found. Download patch: ${{ steps.upload.outputs.artifact-url }}"
echo ""
echo "To apply: unzip pr-${{ github.event.pull_request.number }}-restyled.zip && git am < pr-${{ github.event.pull_request.number }}-restyled.patch"
exit 1