Skip to content
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

Update TPIP report #86

Merged
merged 10 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 38 additions & 8 deletions .github/workflows/tpip-check.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: TPIP Check

on:
# Trigger on pull request any Go package is changed.
pull_request:
paths:
- ".github/workflows/tpip-check.yml"
- "**/go.mod"
- "**/go.sum"
- "scripts/template/**"
workflow_dispatch:


env:
report_name: "tpip.md"
soumeh01 marked this conversation as resolved.
Show resolved Hide resolved

jobs:
check-licenses:
runs-on: ubuntu-latest
Expand All @@ -31,20 +33,48 @@ jobs:

- name: Generate TPIP Report
run: |
go-licenses report . --ignore github.com/Open-CMSIS-Pack/cbuild --template ../../scripts/template/tpip-license.template > ../../scripts/tpip.md
date +"%Y/%m/%d %T" >> ../../scripts/tpip.md
go-licenses report . --ignore github.com/Open-CMSIS-Pack/cbuild --template ../../scripts/template/tpip-license.template > ../../scripts/${{ env.report_name }}
date +"%Y/%m/%d %T" >> ../../scripts/${{ env.report_name }}
working-directory: ./cmd/cbuild

- name: Save Changes
- name: Archive TPIP report
uses: actions/upload-artifact@v3
with:
name: changes
path: scripts/tpip.md
name: tpip-report
path: scripts/${{ env.report_name }}

- name: Print TPIP Report
run: cat tpip.md >> $GITHUB_STEP_SUMMARY
run: cat ${{ env.report_name }} >> $GITHUB_STEP_SUMMARY
working-directory: scripts

- name: Check Licenses
run: go-licenses check . --ignore github.com/Open-CMSIS-Pack/cbuild --disallowed_types=forbidden,restricted
working-directory: ./cmd/cbuild

commit-changes:
needs: [ check-licenses ]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Restore Changes
uses: actions/download-artifact@v3
with:
name: tpip-report

- name: Commit Changes
shell: bash
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Update documentation for ${MSG} ${GITHUB_REF_NAME}"
git push
# - name: Commit Changes
soumeh01 marked this conversation as resolved.
Show resolved Hide resolved
# uses: EndBug/add-and-commit@v9
# with:
# message: "Update TPIP report [skip ci]"
# add: scripts/${{ env.report_name }}
12 changes: 12 additions & 0 deletions tpip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Third Party Intellectual Property (TPIP) Report for [cbuild](https://github.com/Open-CMSIS-Pack/cbuild)

| __Name__ | __Version__ | __Licence__ |
|----------|-------------|-------------|
| cbuild | Unknown | [Apache-2.0](Unknown) |
| github.com/sirupsen/logrus | v1.9.0 | [MIT](https://github.com/sirupsen/logrus/blob/v1.9.0/LICENSE) |
| github.com/spf13/cobra | v1.6.1 | [Apache-2.0](https://github.com/spf13/cobra/blob/v1.6.1/LICENSE.txt) |
| github.com/spf13/pflag | v1.0.5 | [BSD-3-Clause](https://github.com/spf13/pflag/blob/v1.0.5/LICENSE) |
| golang.org/x/sys/unix | v0.5.0 | [BSD-3-Clause](https://cs.opensource.google/go/x/sys/+/v0.5.0:LICENSE) |
| gopkg.in/yaml.v3 | v3.0.1 | [MIT](https://github.com/go-yaml/yaml/blob/v3.0.1/LICENSE) |

Report generated and repository checked for [forbidden](https://github.com/google/licenseclassifier/blob/842c0d70d7027215932deb13801890992c9ba364/license_type.go#L323) and [restricted](https://github.com/google/licenseclassifier/blob/842c0d70d7027215932deb13801890992c9ba364/license_type.go#L176) licenses on: 2023/09/06 08:26:19