-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only run copyright CI when merging into
main
(#1263)
- Loading branch information
1 parent
eb2621a
commit 8bd8fa5
Showing
2 changed files
with
34 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Copyright | ||
|
||
on: | ||
pull_request: | ||
types: [ labeled ] | ||
branches: [ main ] | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
copyright: | ||
name: Copyright Notices | ||
if: | | ||
github.event_name == 'pull_request' && | ||
(contains(github.event.pull_request.labels.*.name, 's:review-needed') || | ||
contains(github.event.pull_request.labels.*.name, 's:accepted')) || | ||
github.event_name == 'push' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
- name: Install check-license and dependencies | ||
run: | | ||
pip install scripts/check-license | ||
pip install -r scripts/check-license/requirements.txt | ||
- name: Query files changed | ||
id: files_changed | ||
uses: Ana06/get-changed-files@v1.2 | ||
with: | ||
filter: '*.rs$' | ||
- name: Check copyright notices | ||
run: check-license ${{ steps.files_changed.outputs.added_modified }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters