Skip to content

Commit

Permalink
Create license-check.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanMeng666 authored Jan 7, 2025
1 parent afe57bf commit f267680
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/license-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: License Check

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: # 允许手动触发

jobs:
license-check:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Check License Header and Update LICENSE
uses: apache/skywalking-eyes/header@main
with:
mode: fix
token: ${{ secrets.GITHUB_TOKEN }}
config: .licenserc.yaml

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
if: steps.license-check.outputs.changed == 'true'
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: update license headers and year"
title: "chore: update license headers and year"
body: |
Automated changes:
- Updated license headers
- Updated license year
branch: update-license
base: main
delete-branch: true

0 comments on commit f267680

Please sign in to comment.