Skip to content

Commit

Permalink
Configure de client version (#26)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ndrezn authored Sep 17, 2024
1 parent 0fd0f85 commit 3967537
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
16 changes: 14 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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




Expand All @@ -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
Expand Down

0 comments on commit 3967537

Please sign in to comment.