77
88jobs :
99 format :
10- if : ${{ github.event.commits != null && !startsWith(github.event.head_commit.message, 'style(fmt)') && !startsWith(github.event.head_commit.message, 'Merge pull request') }}
10+ if : ${{ github.event.commits != null && !startsWith(github.event.head_commit.message, 'style(fmt)') }}
1111 permissions :
1212 contents : write
13- pull-requests : write
1413 runs-on : ubuntu-latest
1514 steps :
1615 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
@@ -19,22 +18,12 @@ jobs:
1918 - uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
2019 with :
2120 node-version : 20.x
22- - name : Install dependencies and run formatter
23- run : |
24- yarn install --frozen-lockfile
25- yarn lint:fix
26- - name : Create Pull Request
27- # Using ADYEN_AUTOMATION_BOT_ACCESS_TOKEN instead of GITHUB_TOKEN
28- # to allow the created PR to trigger other workflows
29- uses : peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11
30- with :
31- token : ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
32- commit-message : " style(fmt): code formatted"
33- title : " style(fmt): Automated code formatting"
34- body : |
35- This PR contains automated code formatting changes.
36-
37- Please review the changes before merging.
38- branch : automated-formatting-${{ github.run_id }}
39- delete-branch : true
40- author : AdyenAutomationBot <${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}>
21+ - run : |
22+ npm ci --legacy-peer-deps
23+ npm run lint:fix
24+ - run : |
25+ git config user.name AdyenAutomationBot
26+ git config user.email "${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}"
27+ git add .
28+ git commit -m "style(fmt): code formatted" || echo "No changes to commit"
29+ git push
0 commit comments