diff --git a/README.md b/README.md index 049d86e..27093a4 100644 --- a/README.md +++ b/README.md @@ -29,14 +29,15 @@ Sync markdown docs to Confluence using mark | `docs-path` |

Folder containing markdown files

| `false` | `.` | | `exclude-dir` |

Exclude the markdown files inside this path

| `false` | `""` | | `changed-only` |

Sync only changed markdown files

| `false` | `false` | -| `dry-run` |

If true this will not push any chnages, but to log the change it would have made

| `false` | `false` | +| `dry-run` |

If true this will not push any changes, but to log the change it would have made

| `false` | `false` | | `confluence-url` |

The destination Confluence url

| `true` | `""` | -| `space` |

Specific Confluence space to pushlish to

| `false` | `""` | -| `parent` |

Specific Confluence parent to pushlish to

| `false` | `""` | +| `space` |

Specific Confluence space to publish to

| `false` | `""` | +| `parent` |

Specific Confluence parent to publish to

| `false` | `""` | | `drop-h1` |

Don't include the first H1 heading in Confluence output

| `false` | `false` | | `strip-linebreaks` |

Remove linebreaks inside of tags, to accommodate non-standard Confluence behavior

| `false` | `false` | | `title-from-h1` |

Extract page title from a leading H1 heading. If no H1 heading on a page exists, then title must be set in the page metadata

| `false` | `false` | | `title-from-filename` |

Use the filename (without extension) as the Confluence page title if no explicit page title is set in the metadata

| `false` | `false` | +| `log-level` |

set the log level. Possible values: TRACE, DEBUG, INFO, WARNING, ERROR, FATAL. (default: 'info')

| `false` | `info` | ## Runs @@ -79,7 +80,7 @@ This action is a `docker` action. # Default: false dry-run: - # If true this will not push any chnages, but to log the change it would have made + # If true this will not push any changes, but to log the change it would have made # # Required: false # Default: false @@ -91,13 +92,13 @@ This action is a `docker` action. # Default: "" space: - # Specific Confluence space to pushlish to + # Specific Confluence space to publish to # # Required: false # Default: "" parent: - # Specific Confluence parent to pushlish to + # Specific Confluence parent to publish to # # Required: false # Default: "" @@ -125,6 +126,12 @@ This action is a `docker` action. # # Required: false # Default: false + + log-level: + # set the log level. Possible values: TRACE, DEBUG, INFO, WARNING, ERROR, FATAL. (default: 'info') + # + # Required: false + # Default: info ``` diff --git a/action.yml b/action.yml index 85466fc..97d5c35 100644 --- a/action.yml +++ b/action.yml @@ -52,6 +52,10 @@ inputs: description: "Use the filename (without extension) as the Confluence page title if no explicit page title is set in the metadata" required: false default: "false" + log-level: + description: "set the log level. Possible values: TRACE, DEBUG, INFO, WARNING, ERROR, FATAL. (default: 'info')" + required: false + default: "info" runs: using: "docker" @@ -70,3 +74,4 @@ runs: MARK_STRIP_LINEBREAKS: ${{ inputs.strip-linebreaks }} MARK_TITLE_FROM_H1: ${{ inputs.title-from-h1 }} MARK_TITLE_FROM_FILENAME: ${{ inputs.title-from-filename }} + MARK_LOG_LEVEL: ${{ inputs.log-level }} diff --git a/entrypoint.sh b/entrypoint.sh index 0174d17..a7c6aa0 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -20,6 +20,8 @@ STRIP_LINEBREAKS="${MARK_STRIP_LINEBREAKS:-false}" TITLE_FROM_H1="${MARK_TITLE_FROM_H1:-false}" TITLE_FROM_FILENAME="${MARK_TITLE_FROM_FILENAME:-false}" +LOG_LEVEL="${MARK_LOG_LEVEL:-info}" + echo "=========================================" @@ -34,6 +36,7 @@ echo "DROP_H1 : ${DROP_H1}" echo "STRIP_LINEBREAKS : ${STRIP_LINEBREAKS}" echo "TITLE_FROM_H1 : ${TITLE_FROM_H1}" echo "TITLE_FROM_FILENAME : ${TITLE_FROM_FILENAME}" +echo "LOG_LEVEL : ${LOG_LEVEL}" echo "=========================================" # Validate mark binary @@ -101,6 +104,7 @@ sync_file() { -p "${MARK_PASSWORD}" -b "${CONFLUENCE_URL}" -u "${MARK_USERNAME}" + --log-level "${LOG_LEVEL^^}" ) # Use environment variable if set, otherwise fall back to file metadata