Skip to content

feat: add cca deployment [skip-line-limit] #4717

feat: add cca deployment [skip-line-limit]

feat: add cca deployment [skip-line-limit] #4717

Workflow file for this run

name: License Header Check
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
jobs:
license-check:
runs-on: ubuntu-latest
name: Check SPDX License Headers
outputs:
needs-fix: ${{ steps.check-headers.outcome == 'failure' }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Check license headers
id: check-headers
run: ./scripts/check-license-headers.sh --check-only
continue-on-error: true
- name: Comment on PR if headers are missing
if: steps.check-headers.outcome == 'failure' && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `❌ **License Header Check Failed**
Some files are missing the required SPDX license header. Please add the following header to the beginning of all \`.js\`, \`.jsx\`, \`.nr\`, \`.rs\`, \`.sol\`, \`.ts\`, and \`.tsx\` files:
\`\`\`
// SPDX-License-Identifier: LGPL-3.0-only
//
// This file is provided WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.
\`\`\`
You can run \`./scripts/check-license-headers.sh --fix\` locally to automatically add missing headers, then commit the changes.
Or run \`./scripts/check-license-headers.sh\` to see which files need headers.`
})
- name: Fail job if headers are missing (PR only)
if: steps.check-headers.outcome == 'failure' && github.event_name == 'pull_request'
run: exit 1