Skip to content

Commit 1ce7c31

Browse files
ci: Run license compliance action on all PRs (#3699)
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)
1 parent 6b8114c commit 1ce7c31

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/enforce-license-compliance.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ on:
88
- release/*
99
- sentry-sdk-2.0
1010
pull_request:
11-
branches:
12-
- master
13-
- main
14-
- sentry-sdk-2.0
11+
12+
# Cancel in progress workflows on pull_requests.
13+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1516

1617
jobs:
1718
enforce-license-compliance:

0 commit comments

Comments
 (0)