Skip to content

Commit

Permalink
Add Github action (#23)
Browse files Browse the repository at this point in the history
* Added action.yml

This allows this repo being used as a GH action in other projects.

Signed-off-by: Felix Exner <[email protected]>

* Added README entry about GitHub action

Explain how to use this tool inside a github workflow and checked the tick for a github action on the feature list.

Signed-off-by: Felix Exner <[email protected]>

---------

Signed-off-by: Felix Exner <[email protected]>
Co-authored-by: Christian Henkel <[email protected]>
Signed-off-by: Christian Henkel <[email protected]>
  • Loading branch information
fmauch and ct2034 committed Sep 27, 2023
1 parent a53db4f commit 526bcf2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,20 @@ optional arguments:
-q, --quiet disable most output
```

### Using it as a GitHub action
You can use `ros_license_toolkit` inside your GitHub workflow in order to check licenses in your
repository in each pull request. Use the following job inside your workflow file:

```yaml
jobs:
check_licenses:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: boschresearch/[email protected]
```
## State of Development
*WORK IN PROGRESS*
This is currently working and feature complete to the point it was originally intended.
Expand All @@ -86,7 +100,7 @@ In particular, the following things will have to be done:
- [x] Allow license name in tag to be also full name of SPDX key.
- [x] Each LicenseTag should have SPDX id.
- [ ] Single license tag without file attribute and single license text should match automatically.
- [ ] Turn into github action.
- [x] Turn into github action.
## License
ros_license_toolkit is open-sourced under the Apache-2.0 license. See the
Expand Down
16 changes: 16 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: ros_license_tool
description: Runs the ros_license_tool on the ROS packages from a repo

runs:
using: composite
steps:
- name: Install Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install package
run: pip install $GITHUB_ACTION_PATH
shell: bash
- name: Run ros_license_toolkit linter
run: ros_license_toolkit .
shell: bash

0 comments on commit 526bcf2

Please sign in to comment.