Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add review dependencies workflow #1052

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/dependency-review-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Fail third party dependency usage if not covered by the curated set of pre-approved licenses.
#
# List was generated from guidance set forth by Amazon open source usage policies.
allow-licenses:
- 'Apache-2.0'
- 'BSD-2-Clause'
- 'BSD-3-Clause'
- 'ISC'
- 'MIT'
4 changes: 0 additions & 4 deletions .github/workflows/ci-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- run: echo "Skipping CI for docs & contrib files"
check-licenses:
runs-on: ubuntu-latest
steps:
- run: echo "Skipping CI for docs & contrib files"
e2e-tests:
strategy:
matrix:
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,6 @@ jobs:
# TODO: Use `go mod tidy --check` after https://github.com/golang/go/issues/27005 is fixed.
- run: go mod tidy
- run: git diff --exit-code
check-licenses:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod
cache: true
- run: make check-licenses
e2e-tests:
strategy:
fail-fast: false
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/review-dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Review dependencies

on:
pull_request:
branches: ['main', 'release/**']
paths:
- 'go.*'

jobs:
review:
runs-on: ubuntu-latest

permissions:
# Write permissions needed to comment review results on PR.
# Pwn request risk mitigated by using pull_request workflow trigger
# and external contributor workflow runs require maintainer approval.
pull-requests: write

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
with:
config-file: './.github/dependency-review-config.yml'
comment-summary-in-pr: always
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,13 @@ download-licenses:

### dependencies in release-please.yaml - end ###

### dependencies in review-dependencies.yaml - start ###

mkdir -p "$(LICENSEDIR)/github.com/actions/dependency-review-action"
curl https://github.com/actions/dependency-review-action/main/LICENSE --output "$(LICENSEDIR)/github.com/actions/dependency-review-action/LICENSE"

### dependencies in review-dependencies.yaml - end ###

### system-level dependencies - start ###

mkdir -p "$(LICENSEDIR)/github.com/lima-vm/lima"
Expand Down
Loading