Skip to content

Commit

Permalink
Add links to 3.0.1 examples and spdx/using
Browse files Browse the repository at this point in the history
- Triggers only when *.json is changing

Signed-off-by: Arthit Suriyawongkul <[email protected]>
  • Loading branch information
bact committed Aug 8, 2024
1 parent 400c9ac commit 06080c8
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 18 deletions.
45 changes: 36 additions & 9 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,38 @@
name: SPDX validation
on:
- pull_request
- push
pull_request:
paths:
- '!presentations/**/*.json'
- '!presentations/**/*.jsonld'
- '!tools-java/**/*.json'
- '!tools-java/**/*.jsonld'
- '!**/spdx2.2/**/*.json'
- '!**/spdx2.2/**/*.jsonld'
- '!**/spdx2.3/**/*.json'
- '!**/spdx2.3/**/*.jsonld'
- '!**/spdx3.0/**/*.json'
- '!**/spdx3.0/**/*.jsonld'
push:
paths:
- '**/*.json'
- '**/*.jsonld'
- '!presentations/**/*.json'
- '!presentations/**/*.jsonld'
- '!tools-java/**/*.json'
- '!tools-java/**/*.jsonld'
- '!**/spdx2.2/**/*.json'
- '!**/spdx2.2/**/*.jsonld'
- '!**/spdx2.3/**/*.json'
- '!**/spdx2.3/**/*.jsonld'
- '!**/spdx3.0/**/*.json'
- '!**/spdx3.0/**/*.jsonld'

jobs:
SPDX_Validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout spdx-examples
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7

- name: Look for files with the wrong location
run: |
Expand All @@ -19,14 +44,15 @@ jobs:
-not -path '*/spdx3.0/*' > flist.txt
if [ "$(cat flist.txt | wc -l)" != "0" ]; then
echo "The following files are in the wrong location and will not be checked:"
cat flist.txt
echo "Expected locations:"
echo "SPDX JSON files are only expected in these locations:"
echo "./presentations/"
echo "./tools-java/
echo "*/spdx2.2/"
echo "*/spdx2.3/"
echo "*/spdx3.0/"
echo ""
echo "The following files are in the wrong location and will not be checked:"
cat flist.txt
exit 1
fi
Expand All @@ -35,11 +61,12 @@ jobs:
find . -name '*.jsonld' > flist.txt
if [ "$(cat flist.txt | wc -l)" != "0" ]; then
echo "The following files have the wrong extension and will not be checked:"
cat flist.txt
echo "Expected extensions:"
echo "SPDX JSON can only has these extensions:"
echo "*.spdx"
echo "*.json"
echo ""
echo "The following files have the wrong extension and will not be checked:"
cat flist.txt
exit 1
fi
Expand Down
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,17 @@ tags
# Persistent undo
[._]*.un~

# macOS
.DS_Store
.AppleDouble
.LSOverride
._*

# Windows
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
*.stackdump
[Dd]esktop.ini
$RECYCLE.BIN/
42 changes: 33 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,46 @@
# SPDX Usage Examples

This repository includes demonstrations of [SPDX](https://spdx.dev) for various scenarios and use cases.
This repository includes demonstrations of [SPDX](https://spdx.dev) for various
scenarios and use cases.

The repository is organized by profiles which represents a set of scenarios and use cases for a particular domain (e.g. security, license compliance).
Each directory contains a README.md file describing the profile and the examples contained within that directory.
The repository is organized by profiles which represents a set of scenarios and
use cases for a particular domain (e.g. security, license compliance).
Each directory contains a README.md file describing the profile and the
examples contained within that directory.

The presentations directory contains examples included in various SPDX presentations.
The [`presentations`](./presentations/) directory contains examples included in
various SPDX presentations.

Please note that this repository does not contain all of the supported fields nor all of the supported serialization formats in the latest version of the spec. Please see the [SPDX Specification Examples](https://github.com/spdx/spdx-spec/tree/development/v2.3.1/examples) for the latest and examples that contain all of the supported fields and formats.
Please note that this repository does not contain all of the supported fields
nor all of the supported serialization formats in the latest version of the
specification.

Additional version-specific examples can be found in the `examples` directory
of each specification version:

- [v3.0.1](https://github.com/spdx/spdx-spec/tree/development/v3.0.1/examples)
- [v2.3.1](https://github.com/spdx/spdx-spec/tree/development/v2.3.1/examples)

More guidance on using SPDX, including how to use SPDX license list short
identifiers in source files and leverage SPDX for compliance with standards and
regulations, is available in the [`spdx/using`](https://github.com/spdx/using/)
repository.

## Licenses

Copyright Contributors to the spdx-examples project.

Unless otherwise specified, source code in this repository is licensed under the GNU General Public License, Version 3 or later (GPL-3.0-or-later). A copy is included in the COPYING file.
Unless otherwise specified, source code in this repository is licensed under
the GNU General Public License, Version 3 or later (GPL-3.0-or-later).
A copy is included in the COPYING file.

Other licenses may be specified as well for certain files for purposes of illustration or where third-party components are used.
Other licenses may be specified as well for certain files for purposes of
illustration or where third-party components are used.

Documentation in this repository is licensed under the Creative Commons Attribution 4.0 International license (CC-BY-4.0), available at https://creativecommons.org/licenses/by/4.0/.
Documentation in this repository is licensed under the Creative Commons
Attribution 4.0 International license (CC-BY-4.0), available at
<https://creativecommons.org/licenses/by/4.0/>.

SPDX documents in this repository are provided under CC0 1.0 Universal (CC0-1.0), available at https://creativecommons.org/publicdomain/zero/1.0/.
SPDX documents in this repository are provided under CC0 1.0 Universal
(CC0-1.0), available at
<https://creativecommons.org/publicdomain/zero/1.0/>.
4 changes: 4 additions & 0 deletions ai/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX AI Profile Usage Examples

This repository includes demonstrations of [SPDX documents](https://spdx.dev)
for various examples of AI applications and models.
File renamed without changes.

0 comments on commit 06080c8

Please sign in to comment.