From c3f493b747e43b3aeb2fd54aeab4e13943907bb9 Mon Sep 17 00:00:00 2001 From: Davide Bianchi Date: Sun, 20 Oct 2024 12:06:21 +0200 Subject: [PATCH] add support to custom working directory --- action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/action.yml b/action.yml index 4607f7d..39c1d96 100644 --- a/action.yml +++ b/action.yml @@ -65,6 +65,9 @@ inputs: commit: description: "Commit SHA or branch to use for the release" required: false + working-directory: + description: "The working directory to run the action in" + required: false outputs: changed_charts: description: "A comma-separated list of charts that were released on this run. Will be an empty string if no updates were detected, will be unset if `--skip_packaging` is used: in the latter case your custom packaging step is responsible for setting its own outputs if you need them." @@ -78,6 +81,10 @@ runs: steps: - id: release run: | + if [[ -n "${{ inputs.working-directory }}" ]]; then + cd "${{ inputs.working-directory }}" + fi + owner=$(cut -d '/' -f 1 <<< "$GITHUB_REPOSITORY") if [[ -n "${{ inputs.owner }}" ]]; then owners=${{ inputs.owner }}