Skip to content

Commit

Permalink
Adding workflow files for checking for Copyright headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
staylorTT committed Aug 2, 2024
1 parent dc92b2b commit ebb653a
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/check-spdx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
DEFAULT:
perform_check: yes # Perform check for all files
allowed_licenses:
- Apache-2.0
license_for_new_files: Apache-2.0 # license to be used when inserting a new copyright notice
new_notice_c: |+ # notice for new C, CPP, H, HPP and LD files
// SPDX-FileCopyrightText: (c) {years} Tenstorrent AI ULC
//
// SPDX-License-Identifier: {license}
new_notice_python: |+ # notice for new python files
# SPDX-FileCopyrightText: (c) {years} Tenstorrent AI ULC
#
# SPDX-License-Identifier: {license}
3 changes: 3 additions & 0 deletions .github/workflows/pull-request-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ on:
jobs:
build-artifacts:
uses: ./.github/workflows/build-artifacts.yml
secrets: inherit
spdx:
uses: ./.github/workflows/spdx.yml
secrets: inherit
15 changes: 15 additions & 0 deletions .github/workflows/spdx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: spdx

on:
workflow_dispatch:
workflow_call:

jobs:
check-spdx-headers:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: enarx/spdx@master
with:
licenses: Apache-2.0
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/espressif/check-copyright/
rev: v1.0.3
hooks:
- id: check-copyright
args: ['--config', '.github/check-spdx.yaml']

0 comments on commit ebb653a

Please sign in to comment.