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 schedule #99

Merged
merged 2 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions .github/workflows/eventlist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ on:
paths:
- '.github/workflows/eventlist.yml'
- 'tools/eventlist/**'
- '!.github/workflows/tpip-check.yml'
- '!tools/eventlist/template/**'
push:
branches: [ main ]
paths:
- '.github/workflows/eventlist.yml'
- 'tools/eventlist/**'
- '!.github/workflows/tpip-check.yml'
- '!tools/eventlist/template/**'
release:
types: [published]

Expand Down
26 changes: 17 additions & 9 deletions .github/workflows/tpip-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- "**/go.sum"
- "tools/eventlist/template/**"
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

env:
tpip_report: "third_party_licenses.md"
Expand Down Expand Up @@ -40,7 +42,6 @@ jobs:
- name: Generate TPIP Report
run: |
go-licenses report . ../make --ignore github.com/ARM-software/CMSIS-View/tree/main/tools/eventlist --template ../../template/${{ env.tpip_report }}.template > ../../${{ env.tpip_report }}
date +"%Y/%m/%d %T" >> ../../${{ env.tpip_report }}
working-directory: ./tools/eventlist/cmd/eventlist

- name: Archive TPIP report
Expand All @@ -58,6 +59,10 @@ jobs:
working-directory: ./tools/eventlist/cmd/eventlist

commit-changes:
# Running this job only on specific event
# in order to have workaround for issue
# related to deletion of GH checks/status data
if: (github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch')
needs: [ check-licenses ]
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -72,11 +77,14 @@ jobs:
name: tpip-report
path: ./tools/eventlist

- name: Commit Changes
shell: bash
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Update TPIP report"
git push
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: Update TPIP report
title: ':robot: [TPIP] Automated report updates'
body: |
Third party IP report updates
branch: update-tpip
delete-branch: true
labels: TPIP
reviewers: soumeh01
2 changes: 1 addition & 1 deletion tools/eventlist/template/third_party_licenses.md.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
| {{ .Name }} | {{ .Version }} | [{{ .LicenseName }}]({{ .LicenseURL }}) |
{{- end }}

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:
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.