-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (25 loc) · 924 Bytes
/
code_style.yml
File metadata and controls
31 lines (25 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Code Style
on:
- pull_request
jobs:
code_style:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v2
with:
# Ensure that git uses your token with write access to the repo
token: ${{ secrets.GH_TOKEN }}
- name: Prepare repository
run: git fetch --unshallow --tags
- name: Install
run: npm i prettier @gisatcz/prettier-config --no-save
- name: Fix Code Style
run: npm run format
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v2.3.0
with:
commit_message: Fix code style ${{ github.event.pull_request.head.sha }} [ci skip]
branch: ${{ github.event.pull_request.head.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}