From 6d5ad0995e5f50c6df278c8e00e8d4c2c92c1496 Mon Sep 17 00:00:00 2001 From: Moritz Wiesinger Date: Tue, 17 Jan 2023 15:36:26 +0100 Subject: [PATCH 1/3] ci: fix python script flags Signed-off-by: Moritz Wiesinger --- .../actions/update-documentation/action.yml | 153 ++++++++++-------- 1 file changed, 85 insertions(+), 68 deletions(-) diff --git a/.github/actions/update-documentation/action.yml b/.github/actions/update-documentation/action.yml index 2742e2be94..058a135225 100644 --- a/.github/actions/update-documentation/action.yml +++ b/.github/actions/update-documentation/action.yml @@ -1,83 +1,100 @@ name: "Update KLT Docs/Examples" description: "Update Keptn Lifecycle Toolkit Documentation and Examples" inputs: - version: - required: true - description: "Version of the Keptn Lifecycle Toolkit Documentation to be deployed" - doc-repo: - required: true - description: "Path to the documentation repository" - default: "keptn-sandbox/lifecycle-toolkit-docs" - examples-repo: - required: true - description: "Path to the examples repository" - default: "keptn-sandbox/lifecycle-toolkit-examples" - klt-repo: - required: true - description: "Path to the klt repository" - default: "lifecycle-toolkit" - update-main: - description: "Update the main version of the documentation" - required: true - default: "false" - target-branch: - description: "Target branch for the documentation" - default: "dev" - required: true - token: - description: "Token to access the documentation repository" - required: true + version: + required: true + description: "Version of the Keptn Lifecycle Toolkit Documentation to be deployed" + doc-repo: + required: true + description: "Path to the documentation repository" + default: "keptn-sandbox/lifecycle-toolkit-docs" + examples-repo: + required: true + description: "Path to the examples repository" + default: "keptn-sandbox/lifecycle-toolkit-examples" + klt-repo: + required: true + description: "Path to the klt repository" + default: "lifecycle-toolkit" + update-main: + description: "Update the main version of the documentation" + required: true + default: "false" + target-branch: + description: "Target branch for the documentation" + default: "dev" + required: true + token: + description: "Token to access the documentation repository" + required: true runs: using: "composite" steps: - - uses: actions/setup-python@v4 - with: - python-version: '3.10' + - uses: actions/setup-python@v4 + with: + python-version: '3.10' - - name: Check out documentation - uses: actions/checkout@v3 - with: - repository: ${{ inputs.doc-repo }} - path: "doc-repo" - ref: "main" - token: ${{ inputs.token }} - fetch-depth: 0 + - name: Check out documentation + uses: actions/checkout@v3 + with: + repository: ${{ inputs.doc-repo }} + path: "doc-repo" + ref: "main" + token: ${{ inputs.token }} + fetch-depth: 0 - - name: Check out examples - uses: actions/checkout@v3 - if: inputs.update-main == 'true' - with: - repository: ${{ inputs.examples-repo }} - path: "example-repo" - ref: "main" - token: ${{ inputs.token }} - fetch-depth: 0 + - name: Check out examples + uses: actions/checkout@v3 + if: inputs.update-main == 'true' + with: + repository: ${{ inputs.examples-repo }} + path: "example-repo" + ref: "main" + token: ${{ inputs.token }} + fetch-depth: 0 - - name: Install dependencies - run: pip install -r .github/actions/update-documentation/scripts/requirements.txt - shell: bash + - name: Install dependencies + run: pip install -r .github/actions/update-documentation/scripts/requirements.txt + shell: bash - - name: Update documentation - shell: bash - run: python .github/actions/update-documentation/scripts/update_docs.py --version ${{ inputs.version }} --klt-docs doc-repo --klt-repo ${{ inputs.klt-repo }} --klt-examples ${{ inputs.examples-repo }} --update-main=${{ inputs.main-version }} + - name: Update documentation + if: inputs.main-version != 'true' + shell: bash + run: | + python .github/actions/update-documentation/scripts/update_docs.py \ + --version ${{ inputs.version }} \ + --klt-docs doc-repo \ + --klt-repo ${{ inputs.klt-repo }} \ + --klt-examples ${{ inputs.examples-repo }} - - name: Commit changes - uses: EndBug/add-and-commit@v9 - with: - author_name: "Keptn Sandbox Bot" - author_email: "keptn@keptn.sh" - cwd: "doc-repo" - message: "Update documentation for version ${{ inputs.version }}" - new_branch: ${{ inputs.target-branch }} + - name: Update documentation + if: inputs.main-version == 'true' + shell: bash + run: | + python .github/actions/update-documentation/scripts/update_docs.py \ + --version ${{ inputs.version }} \ + --klt-docs doc-repo \ + --klt-repo ${{ inputs.klt-repo }} \ + --klt-examples ${{ inputs.examples-repo }} \ + --update-main=${{ inputs.main-version }} - - name: Commit changes to examples - uses: EndBug/add-and-commit@v9 - with: - author_name: Keptn Bot - author_email: keptn@keptn.sh - cwd: examples-repo - message: "Update examples for version ${{ inputs.version }}" - new_branch: ${{ inputs.target-branch }} + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + author_name: "Keptn Sandbox Bot" + author_email: "keptn@keptn.sh" + cwd: "doc-repo" + message: "Update documentation for version ${{ inputs.version }}" + new_branch: ${{ inputs.target-branch }} + + - name: Commit changes to examples + uses: EndBug/add-and-commit@v9 + with: + author_name: Keptn Bot + author_email: keptn@keptn.sh + cwd: examples-repo + message: "Update examples for version ${{ inputs.version }}" + new_branch: ${{ inputs.target-branch }} From d5f3d60327154da114dbc05c21dd7b80c314be90 Mon Sep 17 00:00:00 2001 From: Moritz Wiesinger Date: Tue, 17 Jan 2023 15:37:11 +0100 Subject: [PATCH 2/3] remove styling changes Signed-off-by: Moritz Wiesinger --- .../actions/update-documentation/action.yml | 168 +++++++++--------- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/.github/actions/update-documentation/action.yml b/.github/actions/update-documentation/action.yml index 058a135225..0f445a5b48 100644 --- a/.github/actions/update-documentation/action.yml +++ b/.github/actions/update-documentation/action.yml @@ -1,100 +1,100 @@ name: "Update KLT Docs/Examples" description: "Update Keptn Lifecycle Toolkit Documentation and Examples" inputs: - version: - required: true - description: "Version of the Keptn Lifecycle Toolkit Documentation to be deployed" - doc-repo: - required: true - description: "Path to the documentation repository" - default: "keptn-sandbox/lifecycle-toolkit-docs" - examples-repo: - required: true - description: "Path to the examples repository" - default: "keptn-sandbox/lifecycle-toolkit-examples" - klt-repo: - required: true - description: "Path to the klt repository" - default: "lifecycle-toolkit" - update-main: - description: "Update the main version of the documentation" - required: true - default: "false" - target-branch: - description: "Target branch for the documentation" - default: "dev" - required: true - token: - description: "Token to access the documentation repository" - required: true + version: + required: true + description: "Version of the Keptn Lifecycle Toolkit Documentation to be deployed" + doc-repo: + required: true + description: "Path to the documentation repository" + default: "keptn-sandbox/lifecycle-toolkit-docs" + examples-repo: + required: true + description: "Path to the examples repository" + default: "keptn-sandbox/lifecycle-toolkit-examples" + klt-repo: + required: true + description: "Path to the klt repository" + default: "lifecycle-toolkit" + update-main: + description: "Update the main version of the documentation" + required: true + default: "false" + target-branch: + description: "Target branch for the documentation" + default: "dev" + required: true + token: + description: "Token to access the documentation repository" + required: true runs: using: "composite" steps: - - uses: actions/setup-python@v4 - with: - python-version: '3.10' + - uses: actions/setup-python@v4 + with: + python-version: '3.10' - - name: Check out documentation - uses: actions/checkout@v3 - with: - repository: ${{ inputs.doc-repo }} - path: "doc-repo" - ref: "main" - token: ${{ inputs.token }} - fetch-depth: 0 + - name: Check out documentation + uses: actions/checkout@v3 + with: + repository: ${{ inputs.doc-repo }} + path: "doc-repo" + ref: "main" + token: ${{ inputs.token }} + fetch-depth: 0 - - name: Check out examples - uses: actions/checkout@v3 - if: inputs.update-main == 'true' - with: - repository: ${{ inputs.examples-repo }} - path: "example-repo" - ref: "main" - token: ${{ inputs.token }} - fetch-depth: 0 + - name: Check out examples + uses: actions/checkout@v3 + if: inputs.update-main == 'true' + with: + repository: ${{ inputs.examples-repo }} + path: "example-repo" + ref: "main" + token: ${{ inputs.token }} + fetch-depth: 0 - - name: Install dependencies - run: pip install -r .github/actions/update-documentation/scripts/requirements.txt - shell: bash + - name: Install dependencies + run: pip install -r .github/actions/update-documentation/scripts/requirements.txt + shell: bash - - name: Update documentation - if: inputs.main-version != 'true' - shell: bash - run: | - python .github/actions/update-documentation/scripts/update_docs.py \ - --version ${{ inputs.version }} \ - --klt-docs doc-repo \ - --klt-repo ${{ inputs.klt-repo }} \ - --klt-examples ${{ inputs.examples-repo }} + - name: Update documentation + if: inputs.main-version != 'true' + shell: bash + run: | + python .github/actions/update-documentation/scripts/update_docs.py \ + --version ${{ inputs.version }} \ + --klt-docs doc-repo \ + --klt-repo ${{ inputs.klt-repo }} \ + --klt-examples ${{ inputs.examples-repo }} - - name: Update documentation - if: inputs.main-version == 'true' - shell: bash - run: | - python .github/actions/update-documentation/scripts/update_docs.py \ - --version ${{ inputs.version }} \ - --klt-docs doc-repo \ - --klt-repo ${{ inputs.klt-repo }} \ - --klt-examples ${{ inputs.examples-repo }} \ - --update-main=${{ inputs.main-version }} + - name: Update documentation + if: inputs.main-version == 'true' + shell: bash + run: | + python .github/actions/update-documentation/scripts/update_docs.py \ + --version ${{ inputs.version }} \ + --klt-docs doc-repo \ + --klt-repo ${{ inputs.klt-repo }} \ + --klt-examples ${{ inputs.examples-repo }} \ + --update-main=${{ inputs.main-version }} - - name: Commit changes - uses: EndBug/add-and-commit@v9 - with: - author_name: "Keptn Sandbox Bot" - author_email: "keptn@keptn.sh" - cwd: "doc-repo" - message: "Update documentation for version ${{ inputs.version }}" - new_branch: ${{ inputs.target-branch }} + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + author_name: "Keptn Sandbox Bot" + author_email: "keptn@keptn.sh" + cwd: "doc-repo" + message: "Update documentation for version ${{ inputs.version }}" + new_branch: ${{ inputs.target-branch }} - - name: Commit changes to examples - uses: EndBug/add-and-commit@v9 - with: - author_name: Keptn Bot - author_email: keptn@keptn.sh - cwd: examples-repo - message: "Update examples for version ${{ inputs.version }}" - new_branch: ${{ inputs.target-branch }} + - name: Commit changes to examples + uses: EndBug/add-and-commit@v9 + with: + author_name: Keptn Bot + author_email: keptn@keptn.sh + cwd: examples-repo + message: "Update examples for version ${{ inputs.version }}" + new_branch: ${{ inputs.target-branch }} From a80eb2febfa37e4cd01703bbe83e7fab5f4b37c1 Mon Sep 17 00:00:00 2001 From: Moritz Wiesinger Date: Tue, 17 Jan 2023 15:37:54 +0100 Subject: [PATCH 3/3] fix flag Signed-off-by: Moritz Wiesinger --- .github/actions/update-documentation/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/update-documentation/action.yml b/.github/actions/update-documentation/action.yml index 0f445a5b48..0a2a636d0a 100644 --- a/.github/actions/update-documentation/action.yml +++ b/.github/actions/update-documentation/action.yml @@ -79,7 +79,7 @@ runs: --klt-docs doc-repo \ --klt-repo ${{ inputs.klt-repo }} \ --klt-examples ${{ inputs.examples-repo }} \ - --update-main=${{ inputs.main-version }} + --update-main - name: Commit changes uses: EndBug/add-and-commit@v9