Skip to content

Commit

Permalink
ci: Run license compliance action on all PRs
Browse files Browse the repository at this point in the history
This action only is triggered on PRs to master, but the action is required. This becomes a problem when a PR is opened against a branch other than master (e.g. as part of a PR tree). When the parent branch is merged to master, the PR's base automatically changes to master, but this action does not get triggered. Instead, it blocks on "Expected" and can only be run by adding commits to the branch.

Running the action on PRs against any branch should fix this.

Also, add logic to cancel in-progress workflows on pull requests (logic taken from our other actions)
  • Loading branch information
szokeasaurusrex committed Oct 28, 2024
1 parent 395c6a4 commit 2a72482
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/enforce-license-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ on:
- release/*
- sentry-sdk-2.0
pull_request:
branches:
- master
- main
- sentry-sdk-2.0

# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

jobs:
enforce-license-compliance:
Expand Down

0 comments on commit 2a72482

Please sign in to comment.