From ade0efdefb3c8c8677eba15131e5c8ee1880f2fc Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 20 Nov 2024 23:11:46 +0100 Subject: [PATCH] Added infra-repo-dir input --- action.yml | 5 +++++ entrypoint.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d3613fc6..c7597f7d 100644 --- a/action.yml +++ b/action.yml @@ -9,6 +9,10 @@ inputs: description: "GitHub Token used to perform git and GitHub operations" required: false default: ${{ github.token }} + infra-repo-dir: + description: "Path to the infra repository. Default '/github/workspace/'" + required: false + default: '/github/workspace/' infra-terraform-dirs: description: "Comma or new line separated list of terraform directories in infra repo. For example 'components/terraform,components/terraform-old. Default 'components/terraform'" required: false @@ -68,6 +72,7 @@ runs: env: GITHUB_ACCESS_TOKEN: ${{ inputs.github-access-token }} INFRA_TERRAFORM_DIRS: ${{ inputs.infra-terraform-dirs }} + INFRA_REPO_DIR: ${{ inputs.infra-repo-dir }} VENDORING_ENABLED: ${{ inputs.vendoring-enabled }} MAX_NUMBER_OF_PRS: ${{ inputs.max-number-of-prs }} INCLUDE: ${{ inputs.include }} diff --git a/entrypoint.sh b/entrypoint.sh index 2d103ad7..39947ed3 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -10,7 +10,7 @@ python3 src/main.py \ --github-api-token ${GITHUB_ACCESS_TOKEN} \ --go-getter-tool ${GO_GETTER_TOOL} \ --infra-repo-name ${GITHUB_REPOSITORY} \ - --infra-repo-dir /github/workspace/ \ + --infra-repo-dir ${INFRA_REPO_DIR} \ --infra-terraform-dirs "${INFRA_TERRAFORM_DIRS}" \ --vendoring-enabled ${VENDORING_ENABLED} \ --max-number-of-prs ${MAX_NUMBER_OF_PRS} \