Skip to content

Commit

Permalink
Use concurrency instead of if
Browse files Browse the repository at this point in the history
  • Loading branch information
jodeleeuw authored Jan 17, 2025
1 parent 846602b commit df83261
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ name: build

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
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
strategy:
matrix:
Expand Down

0 comments on commit df83261

Please sign in to comment.