Skip to content

Commit

Permalink
ci(gh-action): add Apache RAT & package license checker workflow w/ l…
Browse files Browse the repository at this point in the history
…icense header additions
  • Loading branch information
erisu committed Mar 12, 2024
1 parent af6335e commit f9d234f
Show file tree
Hide file tree
Showing 22 changed files with 455 additions and 5 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: Release Auditing

on: [push, pull_request]

jobs:
test:
name: Audit Licenses
runs-on: ubuntu-latest
steps:
# Checkout project
- uses: actions/checkout@v4

# Check license headers
- uses: erisu/apache-rat-action@555ae80334a535eb6c1f8920b121563a5a985a75

# Setup environment with node
- uses: actions/setup-node@v4
with:
node-version: 20

# Install node packages
- name: npm install packages
run: npm i

# Check node package licenses
- uses: erisu/license-checker-action@e929758f9416f30234ac454fc9054ca4b803871d
with:
license-config: 'licence_checker.yml'
13 changes: 8 additions & 5 deletions .ratignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Ignore dot files
\.(.*)

# yes, not .gitignore
gitignore

# licenses for both below are in the cordova-ios LICENSE file
NSData+Base64.h
NSData+Base64.m

Contents.json
jasmine.json
fixtures
i386

# Xcode Auto Generated Files
IDEWorkspaceChecks.plist

# Testing Figures
fixtures

node_modules
18 changes: 18 additions & 0 deletions CordovaLib/CordovaLib.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
// !$*UTF8*$!
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
{
archiveVersion = 1;
classes = {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
Expand Down
18 changes: 18 additions & 0 deletions CordovaLib/Info.plist
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
Expand Down
18 changes: 18 additions & 0 deletions CordovaLib/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
Expand Down
60 changes: 60 additions & 0 deletions licence_checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# Compiled list of allowed 3RD PARTY LICENSES from:
#
# ASF CATEGORY A: WHAT CAN WE INCLUDE IN AN ASF PROJECT
# https://www.apache.org/legal/resolved.html#category-a
#
# Licenses converted into the SPDX standardized short identifier format.
# https://spdx.org/licenses/
allowed-licenses:
- 0BSD
- AFL-3.0
- Apache-1.1
- Apache-2.0
- APAFML
- BlueOak-1.0.0
- BSD-2-Clause
- BSD-3-Clause
- BSD-3-Clause-LBNL
- BSL-1.0
- CC-PDDC
- CC0-1.0
- EPICS
- HPND
- ICU
- ISC
- MIT
- MIT-0
- MS-PL
- MulanPSL-2.0
- NCSA
- OGL-UK-3.0
- PHP-3.01
- PostgreSQL
- PSF-2.0
- SMLNJ
- Unicode-DFS-2016
- Unlicense
- UPL-1.0
- W3C
- WTFPL
- X11
- Xnet
- Zlib
- ZPL-2.0
18 changes: 18 additions & 0 deletions templates/project/__PROJECT_NAME__.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
// !$*UTF8*$!
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
{
archiveVersion = 1;
classes = {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<Scheme
LastUpgradeVersion = "0730"
version = "1.3">
Expand Down
18 changes: 18 additions & 0 deletions templates/project/__PROJECT_NAME__/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
Expand Down
18 changes: 18 additions & 0 deletions templates/project/__PROJECT_NAME__/__PROJECT_NAME__-Info.plist
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
Expand Down
Loading

0 comments on commit f9d234f

Please sign in to comment.