Skip to content

Commit 282caf9

Browse files
authored
Auto format workflow (#1294)
* Create format.yml * Fix negation * commit as AdyenAutomationBot
1 parent 283a26b commit 282caf9

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/format.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Node.js Format
2+
3+
on:
4+
push:
5+
branches:
6+
- 'sdk-automation/models'
7+
8+
jobs:
9+
format:
10+
if: ${{ ! startsWith(github.event.head_commit.message, 'style(fmt)') }}
11+
permissions:
12+
contents: write
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
16+
with:
17+
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 20.x
21+
- run: |
22+
npm install
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"
29+
git push

0 commit comments

Comments
 (0)