entrypoint.sh: exit early if git fails
Change the entrypoint script to configure the shell to exit on the first command error and change the git call to set a local intermediate variable, so that any failure in the git command makes the script exit early with an error code.
This way if there’s some problem with the checkout the script should not fail silently.
Signed-off-by: Fabio Baltieri fabiobaltieri@google.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
License Scanning Action
A Github action to scan code for license violations based on a configuration file per repository.
This actions uses a dedicated docker image available from:
https://github.com/zephyrproject-rtos/docker_scancode
Example workflow
The above example checks out the code and runs scancode on all new files being added by the pull request. New files are copied into the
scan/directory to avoid scanning of existing files in the repository.Once scanning is complete, resulting files are uploaded as artifacts and available for further inspection.
The scanner generates a report that can be displayed to show the violations. Depending on your setup, you can either display it as part of the overall action log or you can upload it or put it in a comment in the pull-request.
Configuration
The action expects a configuration file under
.github/namedlicense_config.yml. This file is used to filter the scanning results and identify violations based on whitelisted licenses and license categories.The
licensesection sets the main license for the repository and its category. Files licensed under the same category would be allowed in this case.The
excludesection is used to tell the scanner which extensions and content types to ignore when looking for license/copyright boilerplate.