-
-
Notifications
You must be signed in to change notification settings - Fork 4
CI: Add check-dependencies workflow #120
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8c9a44d
CI: Add check-dependencies workflow
polldo 42bda49
Import license cache from arduino-cli
polldo b813015
Refresh licence cache
polldo 16ab95e
Adjust licenses part 1
polldo 33ebd90
Adjust licenses part 2
polldo 7cedf5f
Adjust licenses part 3
polldo 6e11115
Adjust licenses part 4
polldo 327b4d9
Adjust licenses part 5
polldo e9e9442
Update .github/workflows/check-dependencies-task.yml
polldo 2742493
Update .licenses/go/github.com/fsnotify/fsnotify.dep.yml
polldo 50c018d
Update .licenses/go/google.golang.org/grpc.dep.yml
polldo d916c38
Update .licenses/go/github.com/juju/errors.dep.yml
polldo 8e43ece
Update .licenses/go/github.com/gofrs/uuid.dep.yml
polldo 32f723f
Del dep
polldo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
CI: Add check-dependencies workflow
- Loading branch information
commit 8c9a44d855276bcd2c9eb364e710596aec318955
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-dependencies-task.md | ||
name: Check Dependencies | ||
|
||
env: | ||
# See: https://github.com/actions/setup-go/tree/v2#readme | ||
GO_VERSION: "1.16" | ||
|
||
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows | ||
on: | ||
push: | ||
paths: | ||
- ".github/workflows/check-dependencies-task.ya?ml" | ||
- ".licenses/**" | ||
- ".licensed.json" | ||
- ".licensed.ya?ml" | ||
- "Taskfile.ya?ml" | ||
- "**/go.mod" | ||
- "**/go.sum" | ||
pull_request: | ||
paths: | ||
- ".github/workflows/check-dependencies-task.ya?ml" | ||
- ".licenses/**" | ||
- ".licensed.json" | ||
- ".licensed.ya?ml" | ||
- "Taskfile.ya?ml" | ||
- "**/go.mod" | ||
- "**/go.sum" | ||
workflow_dispatch: | ||
repository_dispatch: | ||
|
||
jobs: | ||
check-cache: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install licensed | ||
uses: jonabc/setup-licensed@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
version: 3.x | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Install Task | ||
uses: arduino/setup-task@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
version: 3.x | ||
|
||
- name: Update dependencies license metadata cache | ||
run: task --silent general:cache-dep-licenses | ||
|
||
- name: Check for outdated cache | ||
id: diff | ||
run: | | ||
git add --intent-to-add . | ||
git diff --color --exit-code | ||
|
||
# Some might find it convenient to have CI generate the cache rather than setting up for it locally | ||
- name: Upload cache to workflow artifact | ||
if: failure() && steps.diff.outcome == 'failure' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
if-no-files-found: error | ||
name: dep-licenses-cache | ||
path: .licenses/ | ||
|
||
check-deps: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install licensed | ||
uses: jonabc/setup-licensed@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
version: 3.x | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Install Task | ||
uses: arduino/setup-task@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
version: 3.x | ||
|
||
- name: Check for dependencies with unapproved licenses | ||
run: task --silent general:check-dep-licenses |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# See: https://github.com/github/licensed/blob/master/docs/configuration.md | ||
|
||
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-dependencies/AGPL-3.0/.licensed.yml | ||
allowed: | ||
# Based on: https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses | ||
- gpl-1.0-or-later | ||
- gpl-1.0+ # Deprecated ID for `gpl-1.0-or-later` | ||
- gpl-2.0-or-later | ||
- gpl-2.0+ # Deprecated ID for `gpl-2.0-or-later` | ||
- gpl-3.0-only | ||
- gpl-3.0 # Deprecated ID for `gpl-3.0-only` | ||
- gpl-3.0-or-later | ||
- gpl-3.0+ # Deprecated ID for `gpl-3.0-or-later` | ||
- lgpl-2.0-or-later | ||
- lgpl-2.0+ # Deprecated ID for `lgpl-2.0-or-later` | ||
- lgpl-2.1-only | ||
- lgpl-2.1 # Deprecated ID for `lgpl-2.1-only` | ||
- lgpl-2.1-or-later | ||
- lgpl-2.1+ # Deprecated ID for `lgpl-2.1-or-later` | ||
- lgpl-3.0-only | ||
- lgpl-3.0 # Deprecated ID for `lgpl-3.0-only` | ||
- lgpl-3.0-or-later | ||
- lgpl-3.0+ # Deprecated ID for `lgpl-3.0-or-later` | ||
- agpl-1.0-or-later | ||
- agpl-3.0-only | ||
- agpl-3.0 # Deprecated ID for `agpl-3.0-only` | ||
- agpl-3.0-or-later | ||
- fsfap | ||
- apache-2.0 | ||
- artistic-2.0 | ||
- clartistic | ||
- sleepycat | ||
- bsl-1.0 | ||
- bsd-3-clause | ||
- cecill-2.0 | ||
- bsd-3-clause-clear | ||
# "Cryptix General License" - no SPDX ID (https://github.com/spdx/license-list-XML/issues/456) | ||
- ecos-2.0 | ||
- ecl-2.0 | ||
- efl-2.0 | ||
- eudatagrid | ||
- mit | ||
- bsd-2-clause # Subsumed by `bsd-2-clause-views` | ||
- bsd-2-clause-netbsd # Deprecated ID for `bsd-2-clause` | ||
- bsd-2-clause-views # This is the version linked from https://www.gnu.org/licenses/license-list.html#FreeBSD | ||
- bsd-2-clause-freebsd # Deprecated ID for `bsd-2-clause-views` | ||
- ftl | ||
- hpnd | ||
- imatix | ||
- imlib2 | ||
- ijg | ||
# "Informal license" - this is a general class of license | ||
- intel | ||
- isc | ||
- mpl-2.0 | ||
- ncsa | ||
# "License of Netscape JavaScript" - no SPDX ID | ||
- oldap-2.7 | ||
# "License of Perl 5 and below" - possibly `Artistic-1.0-Perl` ? | ||
- cc0-1.0 | ||
- cc-pddc | ||
- psf-2.0 | ||
- ruby | ||
- sgi-b-2.0 | ||
- smlnj | ||
- standardml-nj # Deprecated ID for `smlnj` | ||
- unicode-dfs-2015 | ||
- upl-1.0 | ||
- unlicense | ||
- vim | ||
- w3c | ||
- wtfpl | ||
- lgpl-2.0-or-later with wxwindows-exception-3.1 | ||
- wxwindows # Deprecated ID for `lgpl-2.0-or-later with wxwindows-exception-3.1` | ||
- x11 | ||
- xfree86-1.1 | ||
- zlib | ||
- zpl-2.0 | ||
- zpl-2.1 | ||
# Based on individual license text | ||
- eupl-1.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.