From 9025fd01381e16539d8f7eb5abceb59fc4a47ac8 Mon Sep 17 00:00:00 2001 From: vsoch Date: Fri, 25 Mar 2022 22:06:35 -0600 Subject: [PATCH 1/2] creating action branch to test multiprocessing worker Signed-off-by: vsoch --- Dockerfile | 2 +- LICENSE | 2 +- README.md | 6 +++++- action.yml | 4 ++++ entrypoint.sh | 5 +++++ 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 92cab32..8e2807f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/urlstechie/urlchecker:0.0.25 +FROM quay.io/urlstechie/urlchecker:0.0.26-rc1 COPY entrypoint.sh /entrypoint.sh WORKDIR /github/workspace ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] diff --git a/LICENSE b/LICENSE index eeffbf6..9ca62a2 100644 --- a/LICENSE +++ b/LICENSE @@ -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 diff --git a/README.md b/README.md index 25f0e3d..89f849a 100644 --- a/README.md +++ b/README.md @@ -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 @@ -140,6 +143,7 @@ jobs: | `exclude_patterns` | optional | A comma separated list of patterns. | | `exclude_files` | optional | Full paths to files to exclude (comma separated list). | | `force_pass` | optional | Choose whether to force a pass when checks are done. | +| `workers` | optional | The number of checks (one per file) to run in parallel, defaults to 9 | ## Demo - Using version > 0.1.4 diff --git a/action.yml b/action.yml index c2c2bf0..5fc75fe 100644 --- a/action.yml +++ b/action.yml @@ -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" diff --git a/entrypoint.sh b/entrypoint.sh index 37a1fc4..dfd45c5 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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}" From 31340fe288c654544e5c1a48c1a09a258e0a2296 Mon Sep 17 00:00:00 2001 From: vsoch Date: Sun, 27 Mar 2022 15:40:03 -0600 Subject: [PATCH 2/2] preparing for release with multiprocessing 0.0.26 Signed-off-by: vsoch --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8e2807f..13c49ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/urlstechie/urlchecker:0.0.26-rc1 +FROM quay.io/urlstechie/urlchecker:0.0.26 COPY entrypoint.sh /entrypoint.sh WORKDIR /github/workspace ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]