Use "JS Lint" reusable workflow #177
Workflow file for this run
This file contains 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
--- | |
name: Functional Tests | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: ["main"] | |
pull_request: | |
jobs: | |
detect: | |
name: ${{ matrix.provider }} | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- provider: cloudmersive | |
api-key: CLOUDMERSIVE_API_KEY | |
threshold: 0.32 | |
- provider: deepai | |
api-key: DEEPAI_API_KEY | |
threshold: 0.39 | |
- provider: picpurify | |
api-key: PICPURIFY_API_KEY | |
threshold: 0.97 | |
- provider: sightengine | |
api-user: SIGHTENGINE_API_USER | |
api-key: SIGHTENGINE_API_SECRET | |
threshold: 0.8 | |
steps: | |
- name: Checkout ${{ github.repository }} | |
uses: actions/checkout@v4 | |
- name: Prepare API key | |
id: secrets | |
run: | | |
if [ "${{ matrix.provider }}" = "sightengine" ]; then | |
echo "api-key=${{ secrets[matrix.api-user] }},${{ secrets[matrix.api-key] }}" >> $GITHUB_OUTPUT | |
else | |
echo "api-key=${{ secrets[matrix.api-key] }}" >> $GITHUB_OUTPUT | |
fi | |
- name: Download test file | |
run: | | |
curl https://images-na.ssl-images-amazon.com/images/I/91cDPlxcRiL._SL1500_.jpg --output test.jpg | |
git add test.jpg | |
- name: Detect NSFW content | |
uses: ./ | |
with: | |
github_token: "${{ secrets.GITHUB_TOKEN }}" | |
provider: "${{ matrix.provider }}" | |
api_key: "${{ steps.secrets.outputs.api-key }}" | |
threshold: "${{ matrix.threshold }}" |