Skip to content

Add new expect action #95

Add new expect action

Add new expect action #95

Workflow file for this run

---
name: go-licenses
on:
pull_request:
types:
- opened
- synchronize
jobs:
licenses:
name: run go-licenses against this project's dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout Git repository
uses: actions/checkout@v4
- name: Setup Build Environment
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Install go-licenses
run: go install github.com/google/go-licenses@latest
- name: Run go-licenses
run: |
output=$(go-licenses check ./... 2> /dev/null)
if [[ "${output}" == *"ERROR: forbidden license found"* ]]; then
echo "Forbidden licenses found. Please remove them."
exit 1
else
echo "No forbidden licenses found."
fi
shell: bash