diff options
author | TymanWasTaken <tyman@tyman.tech> | 2021-05-18 23:59:12 -0400 |
---|---|---|
committer | TymanWasTaken <tyman@tyman.tech> | 2021-05-18 23:59:12 -0400 |
commit | 26fd95c5c4a5e78200274b306413e07c7def1b8d (patch) | |
tree | e9c877d3054bd549f189c9db483081350981e509 /.github | |
parent | c724e94dd95e62d5ba0cb1b94f6d5d76145302c0 (diff) | |
download | tanzanite-26fd95c5c4a5e78200274b306413e07c7def1b8d.tar.gz tanzanite-26fd95c5c4a5e78200274b306413e07c7def1b8d.tar.bz2 tanzanite-26fd95c5c4a5e78200274b306413e07c7def1b8d.zip |
make github actions format code for me
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/nodejs.yml | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 004fa75..2a0beaa 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -12,16 +12,12 @@ jobs: Test: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [14.x, 15.x] - steps: - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 14.x uses: actions/setup-node@v1 with: - node-version: ${{ matrix.node-version }} + node-version: 14.x - name: Install dependencies run: yarn - name: Fix config @@ -30,5 +26,32 @@ jobs: run: yarn lint - name: Test Build run: yarn build - - name: Test formatting - run: yarn prettier --check . + + Check-Formatting: + runs-on: ubuntu-latest + name: Check formatting + + steps: + - uses: actions/checkout@v2 + with: + persist-credentials: false + fetch-depth: 0 + - name: Use Node.js 14.x + uses: actions/setup-node@v1 + with: + node-version: 14.x + - name: Install dependencies + run: yarn + - name: Configure git + run: | + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + - name: Format and commit code if needed + run: | + yarn format + git commit -am "Automatically format code" + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} |