TPIP Check #966
This file contains hidden or 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
| name: TPIP Check | |
| on: | |
| pull_request: | |
| paths: | |
| - ".github/workflows/tpip-check.yml" | |
| - "**/go.mod" | |
| - "**/go.sum" | |
| - "configs/**" | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| report_name: "third_party_licenses.md" | |
| permissions: | |
| contents: read | |
| jobs: | |
| check-licenses: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Set up Go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | |
| with: | |
| go-version-file: go.mod | |
| check-latest: true | |
| - name: Go tidy | |
| run: go mod tidy | |
| - name: Install go-licenses | |
| run: go install github.com/google/go-licenses@5348b744d0983d85713295ea08a20cca1654a45e # v1.6.0 | |
| - name: Generate TPIP Report | |
| run: | | |
| go-licenses report . \ | |
| --ignore github.com/Open-CMSIS-Pack/generator-bridge \ | |
| --template ../configs/${{ env.report_name }}.template \ | |
| > ../${{ env.report_name }} | |
| working-directory: ./cmd | |
| - name: Archive tpip report | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: tpip-report | |
| path: ./${{ env.report_name }} | |
| - name: Print TPIP Report | |
| run: cat ${{ env.report_name }} >> $GITHUB_STEP_SUMMARY | |
| - name: Check Licenses | |
| run: | | |
| go-licenses check . \ | |
| --ignore github.com/Open-CMSIS-Pack/generator-bridge \ | |
| --disallowed_types=forbidden,restricted | |
| working-directory: ./cmd | |
| commit-changes: | |
| if: (github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch') | |
| needs: [ check-licenses ] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| fetch-depth: 0 | |
| - name: Restore Changes | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| name: tpip-report | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0 | |
| with: | |
| token: ${{ secrets.GRASCI_WORKFLOW_UPDATE }} | |
| 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 |