Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/multiprocessing #83

Merged
merged 2 commits into from
Mar 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/urlstechie/urlchecker:0.0.25
FROM quay.io/urlstechie/urlchecker:0.0.26
COPY entrypoint.sh /entrypoint.sh
WORKDIR /github/workspace
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2021 Ayoub Malek and Vanessa Sochat
Copyright (c) 2019-2022 Ayoub Malek and Vanessa Sochat

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,11 @@ jobs:
# A comma separated list of file patterns (direct paths work as well) to exclude
exclude_files: README.md,/github/workspace/_config.yml

# numbers of workers to run in parallel (defaults to 9 if unset)
workers: 4

# choose if the force pass or not
force_pass : true
force_pass: true
```
## Inputs

Expand All @@ -140,6 +143,7 @@ jobs:
| `exclude_patterns` | <span style="color:green"> optional </span> | A comma separated list of patterns. |
| `exclude_files` | <span style="color:green"> optional </span> | Full paths to files to exclude (comma separated list). |
| `force_pass` | <span style="color:green"> optional </span> | Choose whether to force a pass when checks are done. |
| `workers` | <span style="color:green"> optional </span> | The number of checks (one per file) to run in parallel, defaults to 9 |

## Demo
- Using version > 0.1.4
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ inputs:
required: false
default: ""

workers:
description: "Number of workers to run in parallel (defaults to 9)"
required: false

runs:
using: "docker"
image: "Dockerfile"
Expand Down
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ if [ "${INPUT_VERBOSE}" == "true" ]; then
COMMAND="${COMMAND} --verbose"
fi

# Do we have a number of workers defined?
if [ ! -z "${INPUT_WORKERS}" ]; then
export URLCHECKER_WORKERS=${INPUT_WORKERS}
fi

# file types are optional
if [ ! -z "${INPUT_FILE_TYPES}" ]; then
COMMAND="${COMMAND} --file-types ${INPUT_FILE_TYPES}"
Expand Down