Skip to content

Commit 5c68339

Browse files
committed
Add PDF generation to pipeline parameters
1 parent 005eca9 commit 5c68339

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/public-analyze-code-graph.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ on:
5555
required: false
5656
type: number
5757
default: 5
58+
jupyter-pdf:
59+
description: >
60+
Enable PDF generation for Jupyter Notebooks ("true") or disable it ("false").
61+
required: false
62+
type: string
63+
default: 'true'
5864
outputs:
5965
uploaded-analysis-results:
6066
description: >
@@ -159,7 +165,7 @@ jobs:
159165
shell: bash -el {0}
160166
env:
161167
NEO4J_INITIAL_PASSWORD: ${{ steps.generate-neo4j-initial-password.outputs.neo4j-initial-password }}
162-
ENABLE_JUPYTER_NOTEBOOK_PDF_GENERATION: "true"
168+
ENABLE_JUPYTER_NOTEBOOK_PDF_GENERATION: ${{ inputs.jupyter-pdf }}
163169
IMPORT_GIT_LOG_DATA_IF_SOURCE_IS_PRESENT: "" # Options: "none", "aggregated", "full". default = "plugin" or ""
164170
PREPARE_CONDA_ENVIRONMENT: "false" # Had already been done in step with id "prepare-conda-environment".
165171
run: |

scripts/executeJupyterNotebook.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
# Fail on any error ("-e" = exit on first error, "-o pipefail" exist on errors within piped commands)
2121
set -o errexit -o pipefail
2222

23-
ENABLE_JUPYTER_NOTEBOOK_PDF_GENERATION=${ENABLE_JUPYTER_NOTEBOOK_PDF_GENERATION:-""} # Enable PDF generation for Jupyter Notebooks if set to any non empty value e.g. "true"
23+
ENABLE_JUPYTER_NOTEBOOK_PDF_GENERATION=${ENABLE_JUPYTER_NOTEBOOK_PDF_GENERATION:-""} # Enable PDF generation for Jupyter Notebooks if set to any non empty value like "true" or disable it with "" or "false".
24+
if [ "${ENABLE_JUPYTER_NOTEBOOK_PDF_GENERATION}" == "false" ]; then
25+
ENABLE_JUPYTER_NOTEBOOK_PDF_GENERATION="" # Reset PDF generation if explicitly set to false
26+
fi
2427

2528
## Get this "scripts" directory if not already set
2629
# Even if $BASH_SOURCE is made for Bourne-like shells it is also supported by others and therefore here the preferred solution.

0 commit comments

Comments
 (0)