From b97f006432c899eedd964fc45b9086e2c4a5f628 Mon Sep 17 00:00:00 2001 From: Pini Shahmurov Date: Tue, 17 Sep 2024 09:59:45 +0300 Subject: [PATCH] Tests [UI] Add Initial Workflow to Enable GitHub Actions for Forked Repositories (#319) --- .github/workflows/ci.yaml | 73 +++++++++++++++++++++++++++++++++++++++ .licenserc.json | 4 +++ 2 files changed, 77 insertions(+) create mode 100644 .github/workflows/ci.yaml create mode 100644 .licenserc.json diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..85b565d7 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,73 @@ +# Copyright 2019 Iguazio +# +# Licensed 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: CI + +on: + pull_request: + branches: + - development + - master + - '[0-9]+.[0-9]+.[0-9]+' # Matches branches like '1.2.3' + - '[0-9]+.[0-9]+.[0-9]+_.*' # Matches branches like '1.7.0_cpj_mm' + +jobs: + check-copyright: + name: Check Copyright Existence + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + - name: Check + run: | + deno run --allow-read https://deno.land/x/license_checker@v3.2.3/main.ts + - name: Instructions For Adding Copyright + if: ${{ failure() }} + run: | + echo " + Please add the following lines to the top of your code: + .yaml/Dockerfile/.yml/.py : + # Copyright 2018 Iguazio + # + # Licensed 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. + .js : + /* + Copyright 2019 Iguazio Systems Ltd. + Licensed under the Apache License, Version 2.0 (the "License") with + an addition restriction as set forth herein. 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. + In addition, you may not use the software for any purposes that are + illegal under applicable law, and the grant of the foregoing license + under the Apache 2.0 license is conditioned upon your compliance with + such restriction. + */ + " diff --git a/.licenserc.json b/.licenserc.json new file mode 100644 index 00000000..babf1f63 --- /dev/null +++ b/.licenserc.json @@ -0,0 +1,4 @@ +{ + "**/*.{js,stories.js,yaml,yml}": "Licensed under the Apache License, Version 2.0", + "ignore": ["dist/"] +}