diff --git a/README.md b/README.md index 650958a..dd844c2 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ The inputs this action uses are: | `create_redis` | `false` | None | True to create a Redis instance for the app. | | `create_postgres` | `false` | None | True to create a Postgres instance for the app. | | `create_persistent_filesystem` | `false` | None | True to create a persistent filesystem for the app. | +| `de_client_version` | `false` | None | Version of the Dash Enterprise client to install. If not provided, the latest version will be installed. | ### Preview deploy on pull request This action will deploy branches using the `on: pull_request: types: ['opened', 'edited', 'synchronize', 'closed']` trigger as `https://${DE_HOST}/${APP_NAME}-${event_number}`, e.g. if you are deploying an app called `inventory-analytics` to `example.plotly.host` and your PR number is `15`, the deploy preview would be available at `https://example.plotly.host/inventory-analytics-15` and would be redeployed on every new commit to that PR. diff --git a/action.yml b/action.yml index 90cbfe7..129dbd5 100644 --- a/action.yml +++ b/action.yml @@ -45,6 +45,12 @@ inputs: description: True to create a persistent filesystem for the app. type: boolean required: false + de_client_version: + description: Version of the Dash Enterprise client to install. If not provided, the latest version will be installed. + required: false + default: '' + type: string + @@ -55,11 +61,17 @@ runs: uses: actions/setup-python@v3 with: python-version: '3.10' - - name: Install de-client==1.5.3 + - name: Install de-client shell: bash run: | python -m pip install --upgrade pip - pip install de-client==1.5.3 --extra-index-url=https://${{ inputs.DE_HOST }}/packages + if [ -z "${{ inputs.de_client_version }}" ]; then + # If no version is specified, install the latest version + pip install de-client --extra-index-url=https://${{ inputs.DE_HOST }}/packages + else + # Install the specified version + pip install de-client==${{ inputs.de_client_version }} --extra-index-url=https://${{ inputs.DE_HOST }}/packages + fi - name: Generate app name id: app_name shell: bash