mirror of
https://github.com/actions/checkout.git
synced 2025-04-02 14:30:06 +02:00
33 lines
No EOL
916 B
YAML
33 lines
No EOL
916 B
YAML
name: Licensed
|
|
|
|
on:
|
|
push: {branches: main}
|
|
pull_request: {branches: main}
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
name: Check licenses
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0 # licensed may need more than latest commit on a branch
|
|
- uses: jonabc/setup-licensed@v1
|
|
with:
|
|
version: 2.x
|
|
- run: npm ci
|
|
- id: licensed
|
|
uses: jonabc/licensed-ci@v1
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: actions/github-script@0.2.0
|
|
if: always() && steps.licensed.outputs.pr_number
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
github.issues.createComment({
|
|
...context.repo,
|
|
issue_number: ${{ steps.licensed.outputs.pr_number }}
|
|
body: 'My custom PR message'
|
|
})
|
|
- run: licensed status |