Skip to content

Commit

Permalink
Add workflow to check licenses (#226)
Browse files Browse the repository at this point in the history
This adds a workflow that checks our repository does not use non-BSD-3
compatible licenses.

The workflow reviews each pull requests against given rules, and sends a
summary.
  • Loading branch information
NyanKiyoshi authored Dec 17, 2024
1 parent dad41b4 commit 86e89e4
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/check-licenses.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Check Licenses
on:
pull_request:
types:
- opened
- synchronize
# Labels are needed to handle external contributors
- labeled
- unlabeled
paths:
# Self
- ".github/workflows/check-licenses.yaml"
# Python Ecosystem
- "**/pyproject.toml"
- "**/setup.py"
- "**/requirements*.txt"
- "**/Pipfile.lock"
- "**/poetry.lock"
# JS/TS Ecosystem
- "**/package.json"
- "**/pnpm-lock.yaml"
- "**/package-lock.json"

jobs:
default:
permissions:
contents: read
pull-requests: write
uses: saleor/saleor-internal-actions/.github/workflows/run-license-check.yaml@v1
with:
# List of ecosystems to scan.
ecosystems: >-
python
javascript
# Grant rules (https://github.com/anchore/grant/blob/4362dc22cf5ea9baeccfa59b2863879afe0c30d7/README.md#usage)
rules: |
# Explicitly allow LGPL as "*GPL*" rule will cause to reject them otherwise.
- pattern: "*lgpl*"
name: "allow-lgpl"
mode: "allow"
reason: "LGPL is allowed."
- pattern: "*gpl*"
name: "deny-gpl"
mode: "deny"
reason: "GPL licenses are not compatible with BSD-3-Clause"
- pattern: "*proprietary*"
name: "deny-proprietary"
mode: "deny"
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"name": "saleor-app-payment-stripe",
"description": "Saleor App Payment Stripe is a payment integration app that allows merchants using the Saleor e-commerce platform to accept online payments from customers using Stripe as their payment processor.",
"version": "0.4.0",
"license": "(BSD-3-Clause AND CC-BY-4.0)",
"private": true,
"repository": "github:saleor/saleor-app-payment-stripe",
"homepage": "https://github.com/saleor/saleor-app-payment-stripe",
Expand Down

0 comments on commit 86e89e4

Please sign in to comment.