mirror of
https://github.com/chefyuan/algorithm-base.git
synced 2024-12-26 20:36:18 +00:00
自动化代码重构
This commit is contained in:
parent
1b247df1fd
commit
809e07979a
36
.github/workflows/main.yml
vendored
Normal file
36
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: Format files
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test-and-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Prettier
|
||||
run: npm install --save-dev --save-exact prettier
|
||||
|
||||
- name: Format files
|
||||
run: prettier --write .
|
||||
|
||||
- name: Commit files
|
||||
run: |
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git add .
|
||||
git commit -m "代码重构 【Github Actions】"
|
||||
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ github.ref }}
|
Loading…
Reference in New Issue
Block a user