Update for Community Specification 1.0 license #17
Workflow file for this run
This file contains 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
on: | |
push: | |
branches: | |
- development/v3.0 | |
repository_dispatch: | |
types: | |
- publish_v3_spec | |
workflow_dispatch: {} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: python:3 | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
with: | |
ref: development/v3.0 | |
path: spdx-spec | |
fetch-depth: 0 # Because we will be pushing the gh-pages branch | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
with: | |
repository: spdx/spec-parser | |
ref: main | |
path: spec-parser | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
with: | |
repository: spdx/spdx-3-model | |
ref: main | |
path: spdx-3-model | |
- name: Install pre-requisites | |
run: pip install -r spdx-spec/requirements.txt | |
- name: Install pre-requisites for spec-parser | |
run: pip install -r spec-parser/requirements.txt | |
- name: Build model | |
run: python3 spec-parser/main.py spdx-3-model/model spdx-spec/docs/model | |
- name: Copy JSON annotations | |
run: cp spdx-spec/serialization/jsonld/annotations.ttl spdx-spec/docs/model/jsonld-annotations.ttl | |
- name: Generate JSON schema | |
run: | | |
shacl2code generate \ | |
--input spdx-spec/docs/model/ontology.rdf.ttl \ | |
--input spdx-spec/docs/model/jsonld-annotations.ttl \ | |
--context-url spdx-spec/docs/model/context.jsonld https://spdx.org/rdf/3.0.0/spdx-context.jsonld \ | |
jsonschema \ | |
--output spdx-spec/docs/model/schema.json | |
- name: Set git identity | |
run: git config user.name ci-bot; git config user.email [email protected] | |
working-directory: spdx-spec | |
- name: Sync gh-pages | |
run: git checkout gh-pages && git pull && git checkout development/v3.0 | |
working-directory: spdx-spec | |
- name: Build docs | |
run: mike deploy v3.0 v3-draft -b gh-pages -p | |
working-directory: spdx-spec |