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 }}