-
Notifications
You must be signed in to change notification settings - Fork 17
feat: Add verify headers workflow #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
matbmoser
merged 8 commits into
eclipse-tractusx:main
from
CDiezRodriguez:feat/add-verify-headers
Feb 17, 2025
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
faec5ec
feat: Add License Header workflow
CDiezRodriguez 47faeb9
fix: The License problem
CDiezRodriguez 90de93c
fix: License file
CDiezRodriguez 688c0fe
feat: Add the change proposed by @matbmoser
CDiezRodriguez b105c6b
fix: Name of the jobs and the folder
CDiezRodriguez 1e08055
trivy after tractus-sdk creation
mgarciaLKS 0fd10dd
fix: Check MD in subdirectories
CDiezRodriguez 32de66e
Merge branch 'eclipse-tractusx:main' into feat/add-verify-headers
CDiezRodriguez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
############################################################### | ||
# Copyright (c) 2025 Contributors to the Eclipse Foundation | ||
# | ||
# See the NOTICE file(s) distributed with this work for additional | ||
# information regarding copyright ownership. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License, Version 2.0 which is available at | ||
# https://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. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
############################################################### | ||
|
||
name: "Verify" | ||
|
||
# source: https://github.com/eclipse-tractusx/ssi-dim-wallet-stub/blob/main/.github/workflows/verify.yaml | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: ["main"] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
verify-license-headers: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Verify License Headers | ||
run: |- | ||
cmd="grep -riL \"SPDX-License-Identifier: Apache-2.0\" --include=\*.{py,yaml,yml,sql} --exclude-dir={\*\openapi} ." | ||
violations=$(eval $cmd | wc -l) | ||
if [[ $violations -ne 0 ]] ; then | ||
echo "$violations files without license headers were found:"; | ||
eval $cmd; | ||
exit 1; | ||
fi | ||
|
||
verify-md-license: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Verify the MD footer | ||
run: |- | ||
cmd="grep -riL \"SPDX-License-Identifier: CC-BY-4.0\" --include=\*.md --exclude-dir={\*\openapi} $(find . -mindepth 2 -type f)" | ||
violations=$(eval $cmd | wc -l) | ||
if [[ $violations -ne 0 ]] ; then | ||
echo "$violations files without license headers were found:"; | ||
eval $cmd; | ||
exit 1; | ||
fi | ||
|
||
Review-Allowed-Licenses: | ||
runs-on: ubuntu-latest | ||
continue-on-error: false | ||
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target' | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: 'Check Allowed Licenses' | ||
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0 | ||
with: | ||
fail-on-severity: critical | ||
# Representation of this list: https://www.eclipse.org/legal/licenses.php# | ||
# Expressed with the help of the following IDs: https://spdx.org/licenses/ | ||
allow-licenses: >- | ||
Adobe-Glyph, Apache-1.0, Apache-1.1, Apache-2.0, Artistic-2.0, BSD-2-Clause, BSD-3-Clause, | ||
BSD-4-Clause, 0BSD, BSL-1.0, CDDL-1.0, CDDL-1.1, CPL-1.0, CC-BY-3.0, CC-BY-4.0, CC-BY-2.5, | ||
CC-BY-SA-3.0, CC-BY-SA-4.0, CC0-1.0, EPL-1.0, EPL-2.0, FTL, GFDL-1.3-only, IPL-1.0, ISC, | ||
MIT, MIT-0, MPL-1.1, MPL-2.0, NTP, OpenSSL, PHP-3.01, PostgreSQL, OFL-1.1, Unlicense, | ||
Unicode-DFS-2015, Unicode-DFS-2016, Unicode-TOU, UPL-1.0, W3C-20150513, W3C-19980720, W3C, | ||
WTFPL, X11, Zlib, ZPL-2.1, AGPL-3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.