This action checks each modified and added file with the extensions that is defined in action configuration and failed in case of threshold of NSFW check is greater or equals to the threshold defined in action configuration. NSFW detection runs by chosen provider.
Identifier is cloudmersive
. Sign up to Cloudmersive
official website. Then go to API Keys
page, create a new one and copy it.
Identifier is picpurify
. Sign up to PicPurify
official website. Then go to API Keys
page and copy API key
that is located on the top of the page.
Identifier is sightengine
. Sign up to SightEngine
official website. Then go to Get Started
page and copy API user and API secret from the examples provided. This provider
requires to provide 2 API identifiers, so please put them into api-key
parameter
separated by comma. For example, api-key
should be 123456,abcdef if your
api_user
is 123456 and api_secret
is abcdef.
OS | |
---|---|
Windows | ✅ |
Linux | ✅ |
macOS | ✅ |
The following tools have to be installed for successful work of this GitHub Action: curl, awk.
- uses: fabasoad/nsfw-detection-action@v3
with:
# (Required) Provider identifier.
provider: "picpurify"
# (Required) API key required for the selected provider.
api-key: ${{ secrets.PICPURIFY_API_KEY }}
# (Required) The action will fail if the NSFW detection value is greater
# than or equal to this parameter.
threshold: "0.6"
# (Optional) Comma-separated list of file extensions for NSFW detection.
# Defaults to "jpeg,jpg,png,gif,webp,tiff,bmp".
extensions: "jpg,png,gif"
# (Optional) Comma-separated types of changes made during work on the branch.
# Defaults to "added,copied,modified,renamed".
types: "added,modified"
None.