-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.15 KB
/
license-compliance.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: License and Dependency Check
on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
fix_license:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history to ensure we're on a branch
ref: ${{ github.head_ref }} # Ensure the branch is checked out
- name: Fix License Header
uses: apache/skywalking-eyes/header@v0.6.0
with:
mode: fix
- name: Apply Changes
uses: EndBug/add-and-commit@v9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
author_name: License Bot
author_email: license_bot@github.com
message: 'chore: automatic application of license header'
push: true # Ensure the changes are pushed back to the branch
check_dependencies:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Check Dependencies' License
uses: apache/skywalking-eyes/dependency@v0.6.0