Skip to content

Commit bafd30e

Browse files
committed
Use simpler Restyled workflow
1 parent 69e9d8f commit bafd30e

File tree

1 file changed

+5
-50
lines changed

1 file changed

+5
-50
lines changed

.github/workflows/restyled.yml

Lines changed: 5 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,62 +2,17 @@ name: Restyled
22

33
on:
44
pull_request:
5-
types:
6-
- opened
7-
- reopened
8-
- closed
9-
- synchronize
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
109

1110
jobs:
1211
restyled:
13-
if: |
14-
github.event.action != 'closed' &&
15-
github.event.pull_request.head.repo.full_name == github.repository
16-
runs-on: ubuntu-latest
17-
steps:
18-
- uses: actions/checkout@v4
19-
with:
20-
ref: ${{ github.event.pull_request.head.ref }}
21-
- uses: restyled-io/actions/setup@v3
22-
- id: restyler
23-
uses: restyled-io/actions/run@v3
24-
with:
25-
fail-on-differences: true
26-
- if: |
27-
!cancelled() &&
28-
steps.restyler.outputs.success == 'true' &&
29-
github.event.pull_request.head.repo.full_name == github.repository
30-
uses: peter-evans/create-pull-request@v6
31-
with:
32-
base: ${{ steps.restyler.outputs.restyled-base }}
33-
branch: ${{ steps.restyler.outputs.restyled-head }}
34-
title: ${{ steps.restyler.outputs.restyled-title }}
35-
body: ${{ steps.restyler.outputs.restyled-body }}
36-
labels: restyled
37-
reviewers: ${{ github.event.pull_request.user.login }}
38-
delete-branch: true
39-
40-
restyled-fork:
41-
if: |
42-
github.event.action != 'closed' &&
43-
github.event.pull_request.head.repo.full_name != github.repository
4412
runs-on: ubuntu-latest
4513
steps:
4614
- uses: actions/checkout@v4
4715
- uses: restyled-io/actions/setup@v4
4816
- uses: restyled-io/actions/run@v4
4917
with:
50-
fail-on-differences: true
51-
52-
restyled-cleanup:
53-
if: ${{ github.event.action == 'closed' }}
54-
runs-on: ubuntu-latest
55-
steps:
56-
- uses: restyled-io/actions/setup@v4
57-
- id: restyler
58-
uses: restyled-io/actions/run@v4
59-
- run: gh --repo "$REPO" pr close "$BRANCH" --delete-branch || true
60-
env:
61-
REPO: ${{ github.repository }}
62-
BRANCH: ${{ steps.restyler.outputs.restyled-head }}
63-
GH_TOKEN: ${{ github.token }}
18+
suggestions: true

0 commit comments

Comments
 (0)