Skip to content

Commit 06080c8

Browse files
committed
Add links to 3.0.1 examples and spdx/using
- Triggers only when *.json is changing Signed-off-by: Arthit Suriyawongkul <[email protected]>
1 parent 400c9ac commit 06080c8

File tree

5 files changed

+87
-18
lines changed

5 files changed

+87
-18
lines changed

.github/workflows/pull_request.yml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,38 @@
11
name: SPDX validation
22
on:
3-
- pull_request
4-
- push
3+
pull_request:
4+
paths:
5+
- '!presentations/**/*.json'
6+
- '!presentations/**/*.jsonld'
7+
- '!tools-java/**/*.json'
8+
- '!tools-java/**/*.jsonld'
9+
- '!**/spdx2.2/**/*.json'
10+
- '!**/spdx2.2/**/*.jsonld'
11+
- '!**/spdx2.3/**/*.json'
12+
- '!**/spdx2.3/**/*.jsonld'
13+
- '!**/spdx3.0/**/*.json'
14+
- '!**/spdx3.0/**/*.jsonld'
15+
push:
16+
paths:
17+
- '**/*.json'
18+
- '**/*.jsonld'
19+
- '!presentations/**/*.json'
20+
- '!presentations/**/*.jsonld'
21+
- '!tools-java/**/*.json'
22+
- '!tools-java/**/*.jsonld'
23+
- '!**/spdx2.2/**/*.json'
24+
- '!**/spdx2.2/**/*.jsonld'
25+
- '!**/spdx2.3/**/*.json'
26+
- '!**/spdx2.3/**/*.jsonld'
27+
- '!**/spdx3.0/**/*.json'
28+
- '!**/spdx3.0/**/*.jsonld'
529

630
jobs:
731
SPDX_Validation:
832
runs-on: ubuntu-latest
933
steps:
10-
- uses: actions/checkout@v3
34+
- name: Checkout spdx-examples
35+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
1136

1237
- name: Look for files with the wrong location
1338
run: |
@@ -19,14 +44,15 @@ jobs:
1944
-not -path '*/spdx3.0/*' > flist.txt
2045
2146
if [ "$(cat flist.txt | wc -l)" != "0" ]; then
22-
echo "The following files are in the wrong location and will not be checked:"
23-
cat flist.txt
24-
echo "Expected locations:"
47+
echo "SPDX JSON files are only expected in these locations:"
2548
echo "./presentations/"
2649
echo "./tools-java/
2750
echo "*/spdx2.2/"
2851
echo "*/spdx2.3/"
2952
echo "*/spdx3.0/"
53+
echo ""
54+
echo "The following files are in the wrong location and will not be checked:"
55+
cat flist.txt
3056
exit 1
3157
fi
3258
@@ -35,11 +61,12 @@ jobs:
3561
find . -name '*.jsonld' > flist.txt
3662
3763
if [ "$(cat flist.txt | wc -l)" != "0" ]; then
38-
echo "The following files have the wrong extension and will not be checked:"
39-
cat flist.txt
40-
echo "Expected extensions:"
64+
echo "SPDX JSON can only has these extensions:"
4165
echo "*.spdx"
4266
echo "*.json"
67+
echo ""
68+
echo "The following files have the wrong extension and will not be checked:"
69+
cat flist.txt
4370
exit 1
4471
fi
4572

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,17 @@ tags
2121
# Persistent undo
2222
[._]*.un~
2323

24+
# macOS
25+
.DS_Store
26+
.AppleDouble
27+
.LSOverride
28+
._*
29+
30+
# Windows
31+
Thumbs.db
32+
Thumbs.db:encryptable
33+
ehthumbs.db
34+
ehthumbs_vista.db
35+
*.stackdump
36+
[Dd]esktop.ini
37+
$RECYCLE.BIN/

README.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,46 @@
11
# SPDX Usage Examples
22

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

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

8-
The presentations directory contains examples included in various SPDX presentations.
11+
The [`presentations`](./presentations/) directory contains examples included in
12+
various SPDX presentations.
913

10-
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.
14+
Please note that this repository does not contain all of the supported fields
15+
nor all of the supported serialization formats in the latest version of the
16+
specification.
17+
18+
Additional version-specific examples can be found in the `examples` directory
19+
of each specification version:
20+
21+
- [v3.0.1](https://github.com/spdx/spdx-spec/tree/development/v3.0.1/examples)
22+
- [v2.3.1](https://github.com/spdx/spdx-spec/tree/development/v2.3.1/examples)
23+
24+
More guidance on using SPDX, including how to use SPDX license list short
25+
identifiers in source files and leverage SPDX for compliance with standards and
26+
regulations, is available in the [`spdx/using`](https://github.com/spdx/using/)
27+
repository.
1128

1229
## Licenses
1330

1431
Copyright Contributors to the spdx-examples project.
1532

16-
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.
33+
Unless otherwise specified, source code in this repository is licensed under
34+
the GNU General Public License, Version 3 or later (GPL-3.0-or-later).
35+
A copy is included in the COPYING file.
1736

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

20-
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/.
40+
Documentation in this repository is licensed under the Creative Commons
41+
Attribution 4.0 International license (CC-BY-4.0), available at
42+
<https://creativecommons.org/licenses/by/4.0/>.
2143

22-
SPDX documents in this repository are provided under CC0 1.0 Universal (CC0-1.0), available at https://creativecommons.org/publicdomain/zero/1.0/.
44+
SPDX documents in this repository are provided under CC0 1.0 Universal
45+
(CC0-1.0), available at
46+
<https://creativecommons.org/publicdomain/zero/1.0/>.

ai/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SPDX AI Profile Usage Examples
2+
3+
This repository includes demonstrations of [SPDX documents](https://spdx.dev)
4+
for various examples of AI applications and models.

0 commit comments

Comments
 (0)