Skip to content

Commit

Permalink
ci: added go-licenses (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanholz authored Sep 29, 2023
1 parent 9ad74d7 commit 38862ac
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/go-licenses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "go-licenses"
on:
push:
paths:
- 'go.mod'
branches:
- master

jobs:
go-licenses:
runs-on: ubuntu-latest
name: Run go-licenses
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '>=1.21'
- name: Get google/go-licenses package
run: go install github.com/google/go-licenses@latest
shell: bash
- name: Run go-licenses and save deps
run: go-licenses save ./... --save_path=dependencies --force
- name: Push licenses
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "${{ env.CI_COMMIT_EMAIL }}"
git add dependencies
git commit -m "ci(licenses): updated licenses"
git push

0 comments on commit 38862ac

Please sign in to comment.