Skip to content

Commit 3967537

Browse files
authored
Configure de client version (#26)
* Add pinput to set de_client version * Bump de_client to 1.8.2 * Default to latest version of de-client * Update docs * Close if statement
1 parent 0fd0f85 commit 3967537

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ The inputs this action uses are:
6262
| `create_redis` | `false` | None | True to create a Redis instance for the app. |
6363
| `create_postgres` | `false` | None | True to create a Postgres instance for the app. |
6464
| `create_persistent_filesystem` | `false` | None | True to create a persistent filesystem for the app. |
65+
| `de_client_version` | `false` | None | Version of the Dash Enterprise client to install. If not provided, the latest version will be installed. |
6566

6667
### Preview deploy on pull request
6768
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.

action.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ inputs:
4545
description: True to create a persistent filesystem for the app.
4646
type: boolean
4747
required: false
48+
de_client_version:
49+
description: Version of the Dash Enterprise client to install. If not provided, the latest version will be installed.
50+
required: false
51+
default: ''
52+
type: string
53+
4854

4955

5056

@@ -55,11 +61,17 @@ runs:
5561
uses: actions/setup-python@v3
5662
with:
5763
python-version: '3.10'
58-
- name: Install de-client==1.5.3
64+
- name: Install de-client
5965
shell: bash
6066
run: |
6167
python -m pip install --upgrade pip
62-
pip install de-client==1.5.3 --extra-index-url=https://${{ inputs.DE_HOST }}/packages
68+
if [ -z "${{ inputs.de_client_version }}" ]; then
69+
# If no version is specified, install the latest version
70+
pip install de-client --extra-index-url=https://${{ inputs.DE_HOST }}/packages
71+
else
72+
# Install the specified version
73+
pip install de-client==${{ inputs.de_client_version }} --extra-index-url=https://${{ inputs.DE_HOST }}/packages
74+
fi
6375
- name: Generate app name
6476
id: app_name
6577
shell: bash

0 commit comments

Comments
 (0)