File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Third Party Licenses
2+ on :
3+ push :
4+ branches :
5+ - trunk
6+ paths :
7+ - .github/licenses.tmpl
8+ - .github/workflows/third-party-licenses.yml
9+ - go.mod
10+ - go.sum
11+ - script/licenses*
12+ jobs :
13+ # This job is responsible for updating the third-party license reports and source code.
14+ # It should be safe to cancel as the latest version of `go.mod` should be checked in.
15+ regenerate-licenses :
16+ runs-on : ubuntu-latest
17+ concurrency :
18+ group : ${{ github.workflow }}
19+ cancel-in-progress : true
20+ permissions :
21+ contents : write
22+ steps :
23+ - name : Check out code
24+ uses : actions/checkout@v6
25+ with :
26+ ref : trunk
27+
28+ - name : Set up Go
29+ uses : actions/setup-go@v6
30+ with :
31+ go-version-file : ' go.mod'
32+
33+ - name : Regenerate licenses
34+ run : |
35+ export GOROOT=$(go env GOROOT)
36+ export PATH=${GOROOT}/bin:$PATH
37+ go install github.com/google/go-licenses@5348b744d0983d85713295ea08a20cca1654a45e
38+ make licenses
39+ git diff
40+
41+ - name : Commit and push changes
42+ run : |
43+ if git diff --exit-code; then
44+ echo "No third-party license changes to commit"
45+ else
46+ git config --local user.name "github-actions[bot]"
47+ git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
48+ git add third-party third-party-licenses.*.md
49+ git commit -m "Generate licenses - $GITHUB_SHA"
50+ git pull
51+ git push origin
52+ fi
You can’t perform that action at this time.
0 commit comments