Avoid running action more than once when push to a PR

This commit is contained in:
Josh de Leeuw 2025-01-17 10:08:28 -05:00 committed by GitHub
parent 8ccaa5cb9f
commit 50a3f208ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,8 @@ on: [push, pull_request]
jobs: jobs:
test: test:
name: Build, lint, and test on Node.js ${{ matrix.node }} name: Build, lint, and test on Node.js ${{ matrix.node }}
# Prevent the action running twice when the event is both a push and pull request
if: github.event_name != 'push' || github.event_name == 'push && !github.event.pull_request
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix: