Skip to content

Commit

Permalink
chore: github pr action, run on all, cancel on update and close
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Feb 23, 2024
1 parent 3f904c0 commit c794bd8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: PR

on:
pull_request:
types: [opened, synchronize, reopened]
# https://graphite.dev/docs/stacking-and-ci#running-ci-upstack
# This clause will prevent upstack PRs from running CI, because
# upstack branches aren't directly based on main.
branches: [main]

# cancel previous runs when the PR is updated
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
pr:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }}
steps:
- name: Checkout all commits
uses: actions/checkout@v3
Expand Down

0 comments on commit c794bd8

Please sign in to comment.