Skip to content

Commit

Permalink
Build: Only run code format on push to master
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed May 9, 2020
1 parent fe502f4 commit b6fd81a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,21 @@ env:

jobs:
prettier:
name: Formatter
name: Format code
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}

steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}

- name: Prettier
uses: gulpjs/prettier_action@v2.2
uses: gulpjs/prettier_action@v3.0
with:
# Push back to the same branch that was checked out
branch: ${{ github.head_ref }}
# This part is also where you can pass other options, for example:
commit_message: 'Build: Run prettier'
prettier_options: '--write .'

test:
needs: prettier
name: Tests for Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

Expand Down

0 comments on commit b6fd81a

Please sign in to comment.