Skip to content

Commit 68574f1

Browse files
Merge pull request #23 from Ruh-Al-Tarikh/dependabot/github_actions/actions/checkout-6
chore(deps): bump actions/checkout from 5 to 6
2 parents 2511418 + 77e253a commit 68574f1

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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

0 commit comments

Comments
 (0)