From 92557748822e05f77cf5557d9e18e5a8c86a635c Mon Sep 17 00:00:00 2001 From: Damian Swan Date: Sun, 4 Aug 2024 07:00:00 -0400 Subject: [PATCH 1/2] Create restyled.yml --- .github/workflows/restyled.yml | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/restyled.yml diff --git a/.github/workflows/restyled.yml b/.github/workflows/restyled.yml new file mode 100644 index 0000000..6d63188 --- /dev/null +++ b/.github/workflows/restyled.yml @@ -0,0 +1,36 @@ +name: Restyled + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + restyled: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - uses: restyled-io/restyler/setup@v3 + - id: restyler + uses: restyled-io/restyler/run@v3 + with: + fail-on-differences: true + + - if: | + !cancelled() && + steps.restyler.outputs.success && + github.event.pull_request.head.repo.full_name == github.repository + uses: peter-evans/create-pull-request@v6 + with: + base: ${{ steps.restyler.outputs.restyled-base }} + branch: ${{ steps.restyler.outputs.restyled-head }} + title: ${{ steps.restyler.outputs.restyled-title }} + body: ${{ steps.restyler.outputs.restyled-body }} + labels: "restyled" + reviewers: ${{ github.event.pull_request.user.login }} + delete-branch: true From fcf88f6377a6c90c66ae1aa72f16376c3583ce26 Mon Sep 17 00:00:00 2001 From: Damian Swan Date: Mon, 5 Aug 2024 12:46:44 -0400 Subject: [PATCH 2/2] Update restyled.yml --- .github/workflows/restyled.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/restyled.yml b/.github/workflows/restyled.yml index 6d63188..0e5e4a6 100644 --- a/.github/workflows/restyled.yml +++ b/.github/workflows/restyled.yml @@ -15,15 +15,15 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} - - uses: restyled-io/restyler/setup@v3 + - uses: restyled-io/actions/setup@v3 - id: restyler - uses: restyled-io/restyler/run@v3 + uses: restyled-io/actions/run@v3 with: fail-on-differences: true - if: | !cancelled() && - steps.restyler.outputs.success && + steps.restyler.outputs.success == 'true' && github.event.pull_request.head.repo.full_name == github.repository uses: peter-evans/create-pull-request@v6 with: