Add license workflow

This commit is contained in:
Taras Greben 2026-05-07 17:13:05 +03:00
commit 642bc207f0
4 changed files with 53 additions and 3 deletions

View file

@ -0,0 +1,30 @@
name: Auto Add License Headers
on:
workflow_dispatch:
jobs:
add-headers:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write # Needed to open the PR
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Inject Copyright Headers
uses: apache/skywalking-eyes/header@main
with:
mode: fix
config: .licenserc.yaml
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: automatically enrich source files with copyright headers"
title: "chore: add missing copyright headers"
body: "This PR automatically adds the missing SPDX copyright headers to all source files."
branch: "chore/add-license-headers"
base: "main"

View file

@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_request.pull_request
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event.pull_request
uses: cla-assistant/github-action@v2.5.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

20
.licenserc.yaml Normal file
View file

@ -0,0 +1,20 @@
# Copyright (c) 2025-2026 Taras Greben
# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial-pcb-retrace
# See LICENSE file for details.
header:
license:
spdx-id: "AGPL-3.0-only"
copyright-owner: "Taras Greben"
content: |
Copyright (c) 2025-2026 Taras Greben
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial-pcb-retrace
See LICENSE file for details.
paths-ignore:
- 'dist'
- 'node_modules'
- 'docs/CNAME'
- '**/*.md'
- 'LICENSE'
- '.github'

View file

@ -8,7 +8,7 @@ This software is available under two different licenses:
this software for free, provided that you disclose your source code and
license modified versions under the same AGPLv3 terms (including network use).
2. Commercial License
2. Commercial License (LicenseRef-Commercial-pcb-retrace)
If you wish to use this software in a proprietary setting, without the
obligations of the AGPLv3 (such as disclosing your modifications), you
must acquire a commercial license.
@ -20,7 +20,7 @@ This software is available under two different licenses:
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2025 Taras Greben
Copyright (C) 2025-2026 Taras Greben
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by