-
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.33 KB
/
license-check.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
name: Check License Headers
on:
push:
branches: [dev]
pull_request:
branches: [dev]
workflow_dispatch:
jobs:
detect-duplicate-actions:
uses: ./.github/workflows/detect-duplicate-actions.yml
check-license-headers:
name: check-license-headers
needs: detect-duplicate-actions
if: ${{ needs.detect-duplicate-actions.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout Code (Non-PR)
uses: actions/checkout@v3
if: ${{ github.event_name != 'pull_request' }}
- name: Checkout Code (PR)
uses: actions/checkout@v3
if: ${{ github.event_name == 'pull_request' }}
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Fix License Header
uses: apache/skywalking-eyes/header@main
with:
mode: fix
log: info
config: .github/config/.licenserc.yml
- name: Push Changes
uses: EndBug/add-and-commit@v9
with:
message: 'chore(license): add license header to files'
default_author: github_actions