Skip to content

Add personalized messages to the deployments #35

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ The inputs this action uses are:
| `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. |
| `deploy_message` | `false` | None |Comment to use for the deploy commit. If not provided, the default commit message will be used. |

### 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
15 changes: 11 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ inputs:
required: false
default: ''
type: string
deploy_message:
description: Comment to use for the deploy commit. If not provided, the default commit message will be used.
required: false
type: string





runs:
using: composite
steps:
Expand Down Expand Up @@ -150,7 +152,12 @@ runs:
shell: bash
if: github.event.action != 'closed'
run: |
de --no-keyfile deploy ${{ inputs.app_directory }} --name ${{ steps.app_name.outputs.app_name }} --message "Deployed commit: $GITHUB_SHA" -y
if [[ -z "${{ inputs.deploy_message }}" ]]; then
deploy_message="Deployed commit: $GITHUB_SHA"
else
deploy_message="${{ inputs.deploy_message }}"
fi
de --no-keyfile deploy ${{ inputs.app_directory }} --name ${{ steps.app_name.outputs.app_name }} --message "$deploy_message" -y
de --no-keyfile apps update --name ${{ steps.app_name.outputs.app_name }} --add-group-co-owner "${{ inputs.group_co_owners }}" --add-group-viewer "${{ inputs.group_viewers }}"
env:
DASH_ENTERPRISE_HOST: ${{inputs.DE_HOST}}
Expand Down