Skip to content

Commit

Permalink
Switch to REUSE.toml, restrict PR license check to modified files
Browse files Browse the repository at this point in the history
  • Loading branch information
ajtribick committed Nov 21, 2024
1 parent 35f14ef commit 368ab2e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 27 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,18 @@ jobs:
- name: Checkout source code
uses: actions/checkout@v4

- name: Validate licenses
- name: Validate license (pull request)
if: github.event_name == 'pull_request'
working-directory: ${{github.workspace}}
run: |
git diff --name-only ${{ github.event.base_ref }} ${{ github.event.head_ref }} \
| sed -E 's/\.license$//' \
| sort -u \
| xargs -d '\n' ls -1d 2>/dev/null \
| xargs -d '\n' python3 -m pipx run reuse lint-files --
- name: Validate licenses (push)
if: github.event_name == 'push'
working-directory: ${{github.workspace}}
run: |
python3 -m pipx run reuse lint
Expand Down
26 changes: 0 additions & 26 deletions .reuse/dep5

This file was deleted.

22 changes: 22 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version = 1
SPDX-PackageName = "Celestia Content"
SPDX-PackageSupplier = "Celestia Development Team"
SPDX-PackageDownloadLocation = "https://github.com/CelestiaProject/CelestiaContent"

[[annotations]]
path = "README"
precedence = "aggregate"
SPDX-FileCopyrightText = "Celestia Development Team"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ".github/**"
precedence = "aggregate"
SPDX-FileCopyrightText = "Celestia Development Team"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = "debian/**"
precedence = "aggregate"
SPDX-FileCopyrightText = ["2001-2002 Marcelo E. Magallon <[email protected]>", "2003 Mika Fischer <[email protected]>", "2005 Mathias Weyland <[email protected]>", "2007-2013 Guus Sliepen <[email protected]>", "2019 Celestia Development Team"]
SPDX-License-Identifier = "GPL-2.0-or-later"

0 comments on commit 368ab2e

Please sign in to comment.