Giter Club home page Giter Club logo

nsfw-detection-action's Introduction

NSFW detection action

Stand With Ukraine GitHub release (latest SemVer including pre-releases) unit-tests functional-tests security linting Maintainability Test Coverage Known Vulnerabilities

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.

Contents

Providers

Cloudmersive

Identifier is cloudmersive. Sign up to Cloudmersive official website. Then go to API Keys page, create a new one and copy it.

DeepAI

Identifier is deepai. Sign up to DeepAI official website. Then go to Profile page and copy api-key that is located on the top of the page.

PicPurify

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.

SightEngine

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, your api_user is 123456 and api_secret is abcdef, so api_key should be 123456,abcdef.

Inputs

Name Required Description Default Possible values
github_token Yes GitHub token <String>
provider Yes Provider identifier <String>
api_key Yes API key that should be used for chosen provider <String>
threshold Yes Action will be failed in case NSFW detection value will be greater or equal to this parameter <Float>
type No Type of committed files separated by comma modified,added,renamed modified,added,renamed
extensions No List of file extensions separated by comma jpeg,jpg,png,gif,webp,tiff,bmp jpeg,jpg,png,gif,webp,tiff,bmp

Example usage

Workflow configuration

name: Test

on: push

jobs:
  nsfw-detection:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@main
      - uses: fabasoad/nsfw-detection-action@main
        with:
          provider: deepai
          threshold: 0.9
          type: modified,added,renamed
          extensions: jpg,jpeg
          github_token: ${{ secrets.GITHUB_TOKEN }}
          api_key: ${{ secrets.DEEPAI_API_KEY }}

Result

Result

nsfw-detection-action's People

Contributors

dependabot[bot] avatar fabasoad avatar github-actions[bot] avatar pre-commit-ci[bot] avatar snyk-bot avatar yevhen-fabizhevskyi-wbyt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nsfw-detection-action's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.