diff --git a/.github/workflows/CheckCodeQuality.yml b/.github/workflows/CheckCodeQuality.yml index 0a3ab484..3ec10a84 100644 --- a/.github/workflows/CheckCodeQuality.yml +++ b/.github/workflows/CheckCodeQuality.yml @@ -86,7 +86,6 @@ jobs: - name: 👮 Bandit id: bandit - if: inputs.artifact != '' run: | set +e diff --git a/.github/workflows/CleanupArtifacts.yml b/.github/workflows/CleanupArtifacts.yml index 988a781e..84fcc872 100644 --- a/.github/workflows/CleanupArtifacts.yml +++ b/.github/workflows/CleanupArtifacts.yml @@ -96,7 +96,7 @@ jobs: case [prefix, key, postfix] if key in artifactNames: artifacts.append(f"{prefix}{artifactNames[key]}{postfix}") case _: - printf(f"Name '{name}' not found in JSON dictionary.") + print(f"Name '{name}' not found in JSON dictionary.") print("Artifact to delete:") for name in artifacts: @@ -143,7 +143,7 @@ jobs: case [prefix, key, postfix] if key in artifactNames: artifacts.append(f"{prefix}{artifactNames[key]}{postfix}") case _: - printf(f"Name '{name}' not found in JSON dictionary.") + print(f"Name '{name}' not found in JSON dictionary.") print("Artifact to delete:") for name in artifacts: diff --git a/.github/workflows/PrepareJob.yml b/.github/workflows/PrepareJob.yml index 6cd1fd07..6ea6eecc 100644 --- a/.github/workflows/PrepareJob.yml +++ b/.github/workflows/PrepareJob.yml @@ -366,9 +366,9 @@ jobs: fi # Submodules - if [[ -f .gitsubmodules ]]; then + git_modules_file=.gitmodules # $(git rev-parse --show-toplevel)/.gitmodules + if [[ -f "${git_modules_file}" ]]; then has_submodules="true" - git_modules_file=.gitmodules # $(git rev-parse --show-toplevel)/.gitmodules git_submodule_count="$(grep -Po '(?<=\[submodule \")(.*)(?=\"\])' "${git_modules_file}" | wc -l)" git_submodule_names="$(grep -Po '(?<=\[submodule \")(.*)(?=\"\])' "${git_modules_file}" | paste -sd ':' -)" git_submodule_paths="$(git config --file "${git_modules_file}" --null --name-only --get-regexp '\.path$' | xargs -0 -n1 git config --file "${git_modules_file}" --get | paste -sd ':' -)" diff --git a/.github/workflows/_Checking_CleanupArtifacts.yml b/.github/workflows/_Checking_CleanupArtifacts.yml index f599c84f..5fedf489 100644 --- a/.github/workflows/_Checking_CleanupArtifacts.yml +++ b/.github/workflows/_Checking_CleanupArtifacts.yml @@ -58,8 +58,10 @@ jobs: - Package with: json: ${{ needs.Params.outputs.artifact_names }} + # Deliberate added 'unknown_key' for exception testing. artifact-json-ids: >- unittesting_xml:-* + unknown_key # The package artifact is kept on tagged runs, so 'PublishOnPyPI.yml' can still consume it. json2: ${{ needs.Params.outputs.artifact_names }} condition2: ${{ ! startsWith(github.ref, 'refs/tags') }}