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

Fix logic for checking documentation framework #153

Merged
merged 1 commit into from
May 23, 2023
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
9 changes: 5 additions & 4 deletions .github/workflows/cd_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,11 @@ jobs:
steps:
- name: Check input
run: |
if [[ "${{ inputs.docs_framework }}" != "mkdocs" || "${{ inputs.docs_framework }}" != "sphinx" ]]; then
echo "The input 'docs_framework' must be either 'mkdocs' or 'sphinx' !"
echo "Found value: ${{ inputs.docs_framework }}"
exit 1
valid_frameworks=("mkdocs sphinx")
if [[ ! " ${valid_frameworks[*]} " =~ " ${{ inputs.docs_framework}} " ]]; then
echo "The input '${{ inputs.docs_framework}}' is not supported."
echo "Valid inputs are: ${valid_frameworks[*]}"
exit 1
fi

- name: Checkout ${{ github.repository }}
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/ci_cd_updated_default_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,11 @@ jobs:
steps:
- name: Check input
run: |
if [[ "${{ inputs.docs_framework }}" != "mkdocs" || "${{ inputs.docs_framework }}" != "sphinx" ]]; then
echo "The input 'docs_framework' must be either 'mkdocs' or 'sphinx' !"
echo "Found value: ${{ inputs.docs_framework }}"
exit 1
valid_frameworks=("mkdocs sphinx")
if [[ ! " ${valid_frameworks[*]} " =~ " ${{ inputs.docs_framework}} " ]]; then
echo "The input '${{ inputs.docs_framework}}' is not supported."
echo "Valid inputs are: ${valid_frameworks[*]}"
exit 1
fi

- name: Release check
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,11 @@ jobs:
("${{ inputs.use_mkdocs }}" == "false" && "${{ inputs.use_sphinx }}" == "false") || \
("${{ inputs.use_mkdocs }}" == "true" && "${{ inputs.use_sphinx }}" == "false") ]]; then
# (Default to) using MkDocs
echo "Framework determined: MkDocs"
echo "framework=mkdocs" >> $GITHUB_ENV
elif [[ "${{ inputs.use_mkdocs }}" == "false" && "${{ inputs.use_sphinx }}" == "true" ]]; then
# Use Sphinx
echo "Framework determined: Sphinx"
echo "framework=sphinx" >> $GITHUB_ENV
else
echo "Could not determine what documentation framework to use."
Expand Down