diff --git a/action.yml b/action.yml index fbae135..c86871b 100644 --- a/action.yml +++ b/action.yml @@ -10,6 +10,10 @@ inputs: description: Regex to match environments which will be pushed to directly required: false default: .*(development|integration).* + base-path: + description: Base path for directories base and env directories + required: false + default: '.' pr-environment-regex: description: | Regex to match environments which will push to a @@ -78,6 +82,7 @@ runs: shell: bash working-directory: ${{ inputs.working-directory }} env: + BASE_PATH: ${{ inputs.base-path }} ENV: ${{ inputs.environment }} PUSH_ENVIRONMENT_REGEX: ${{ steps.detect-push-environment.outputs.match }} PR_ENVIRONMENT_REGEX: ${{ steps.detect-pr-environment.outputs.match }} diff --git a/setup-shared-env.sh b/setup-shared-env.sh index 9b08b67..6c8804f 100755 --- a/setup-shared-env.sh +++ b/setup-shared-env.sh @@ -8,7 +8,7 @@ set -e DEPLOY_REPO_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" echo "DEPLOY_REPO_URL=${DEPLOY_REPO_URL}" >> "${GITHUB_ENV}" -ENV_DIR="env/${ENV}" +ENV_DIR="${BASE_PATH}/env/${ENV}" echo "ENV_DIR=${ENV_DIR}" >> "${GITHUB_ENV}" ENV_BRANCH="$(echo "${ENV_DIR}" | tr "/" "-")"