Skip to content

Commit 0628697

Browse files
authored
Merge pull request #35 from dokku/trace-mode
Add TRACE mode for debugging
2 parents 88b90f0 + 7055bc6 commit 0628697

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ Please note that this action is compatible with `dokku >= 0.11.6`.
5959
-----END OPENSSH PRIVATE KEY-----
6060
```
6161
62+
- `trace`: (_optional_) Allows users to debug what the action is performing by enabling shell trace mode
63+
- example value: `1`
64+
6265
## Examples
6366
6467
All examples below are functionally complete and can be copy-pasted into a `.github/workflows/deploy.yaml` file, with some minor caveats:
@@ -76,7 +79,7 @@ For simplicity, each example is standalone, but may be combined as necessary to
7679
7780
The `SSH_HOST_KEY` value can be retrieved by calling `ssh-keyscan -t rsa $HOST`, where `$HOST` is the Dokku server's hostname.
7881
- [Specify a custom deploy branch](/example-workflows/custom-deploy-branch.yml): Certain Dokku installations may use custom deploy branches other than `master`. In the following example, we push to the `develop` branch.
79-
- [Verbose Push Logging](/example-workflows/verbose-logging.yml): Verbose client-side logging may be enabled with this method. Note that this does not enable trace mode on the deploy, and simply tells the `git` client to enable verbose log output
82+
- [Verbose Push Logging](/example-workflows/verbose-logging.yml): Verbose client-side logging may be enabled with this method, as well as trace mode for all shell command output. Note that this does not enable trace mode on the remote deploy, and simply tells the `git` client to enable verbose log output.
8083
- [Force Pushing](/example-workflows/force-push.yml): If the remote app has been previously pushed manually from a location other than CI, it may be necessary to enable force pushing to avoid git errors.
8184
- [Review Apps](/example-workflows/review-app.yml): Handles creation and deletion of review apps through use of `dokku apps:clone` and `dokku apps:destroy`. Review apps are a great way to allow folks to preview pull request changes before they get merged to production.
8285
- Placing a shell script at `bin/ci-pre-deploy` can be used to reconfigure the app, as shown in [this example](/example-workflows/review-app/ci-pre-deploy).

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ inputs:
5252
ssh_private_key:
5353
description: "A private SSH key that has push acces to your Dokku instance"
5454
required: true
55+
trace:
56+
description: "Allows users to debug what the action is performing by enabling shell trace mode"
57+
required: false
58+
default: ""
5559
runs:
5660
using: "docker"
5761
image: "Dockerfile"
@@ -71,3 +75,4 @@ runs:
7175
REVIEW_APP_NAME: ${{ inputs.review_app_name }}
7276
SSH_HOST_KEY: ${{ inputs.ssh_host_key }}
7377
SSH_PRIVATE_KEY: ${{ inputs.ssh_private_key }}
78+
TRACE: ${{ inputs.trace }}

example-workflows/verbose-logging.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ jobs:
2626
git_push_flags: '-vvv'
2727
git_remote_url: 'ssh://[email protected]:22/appname'
2828
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
29+
# enable shell trace mode
30+
trace: '1'

0 commit comments

Comments
 (0)