Skip to content

Commit cbde1f4

Browse files
committed
ci: Add alt auto lint
1 parent 9a60ad9 commit cbde1f4

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/pull_request.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
jobs:
66
build-pr:
77
runs-on: ubuntu-latest
8+
permissions:
9+
contents: write
10+
pull-requests: write
811
steps:
912
- uses: actions/checkout@v3
1013
- uses: webiny/action-conventional-commits@v1.2.0
@@ -28,9 +31,15 @@ jobs:
2831
- name: Check if there are style changes
2932
id: changes-spotless
3033
uses: UnicornGlobal/has-changes-action@v1.0.11
31-
- uses: SOF3/octodiff@1.0.0
32-
with:
33-
token: ${{secrets.GH_TOKEN}}
34+
- name: Push local changes
35+
if: steps.changes-spotless.outputs.changed == 1 || steps.changes-openrewrite.outputs.changed
36+
run: |
37+
git config --global user.name "github-actions"
38+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
39+
git add -A
40+
git commit -m "style: Apply linting rules"
41+
git push "https://${GITHUB_ACTOR}:${{ env.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" HEAD:${{ github.ref_name }}-lint --force
42+
shell: bash
3443
- name: Process lint changes
3544
if: steps.changes-spotless.outputs.changed == 1 || steps.changes-openrewrite.outputs.changed
3645
uses: actions/github-script@v3

0 commit comments

Comments
 (0)