build(deps): bump actions/checkout from 3 to 4 #6
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
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: "third_party_licenses.md" | |
jobs: | |
check-licenses: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
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@latest | |
- name: Generate TPIP Report | |
run: | | |
go-licenses report . --ignore github.com/Open-CMSIS-Pack/cpackget --template ../scripts/template/tpip-license.template > ../${{ env.report_name }} | |
date +"%Y/%m/%d %T" >> ../${{ env.report_name }} | |
working-directory: ./cmd | |
- name: Archive tpip report | |
uses: actions/upload-artifact@v3 | |
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/cpackget --disallowed_types=forbidden,restricted | |
working-directory: ./cmd | |
commit-changes: | |
needs: [ check-licenses ] | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
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 TPIP report" | |
git push | |