From 266524f283b467efa6066ebbc88d66bffb792332 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Sat, 24 Feb 2024 16:13:47 +0000 Subject: [PATCH] fix: configurable example dotenv file location --- .github/workflows/remote_deploy.yml | 6 ++++++ .github/workflows/test_compose.yml | 6 ++++++ .github/workflows/test_pytest.yml | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/.github/workflows/remote_deploy.yml b/.github/workflows/remote_deploy.yml index c93466d..463f6cc 100644 --- a/.github/workflows/remote_deploy.yml +++ b/.github/workflows/remote_deploy.yml @@ -14,6 +14,10 @@ on: description: "Path to docker compose file to deploy." required: true type: string + example_env_file_path: + description: "Path to example dotenv file to substitute variables for." + type: string + default: .env.example jobs: remote-deploy: @@ -51,6 +55,8 @@ jobs: fi - name: Create .env file + env: + EXAMPLE_DOTENV: ${{ inputs.example_env_file_path }} run: | echo "Checking if ${EXAMPLE_DOTENV} exists" if [ -f ${EXAMPLE_DOTENV} ]; then diff --git a/.github/workflows/test_compose.yml b/.github/workflows/test_compose.yml index b0d40fe..d8bb9f9 100644 --- a/.github/workflows/test_compose.yml +++ b/.github/workflows/test_compose.yml @@ -67,6 +67,10 @@ on: description: "A initialisation command to run prior to the docker compose command." required: false type: string + example_env_file_path: + description: "Path to example dotenv file to substitute variables for." + type: string + default: .env.example environment: description: "The environment to use for testing." required: false @@ -223,6 +227,8 @@ jobs: fi - name: Create .env file + env: + EXAMPLE_DOTENV: ${{ inputs.example_env_file_path }} run: | echo "Checking if ${EXAMPLE_DOTENV} exists" if [ -f ${EXAMPLE_DOTENV} ]; then diff --git a/.github/workflows/test_pytest.yml b/.github/workflows/test_pytest.yml index 80b77cf..bb8b4db 100644 --- a/.github/workflows/test_pytest.yml +++ b/.github/workflows/test_pytest.yml @@ -35,6 +35,10 @@ on: required: false type: boolean default: true + example_env_file_path: + description: "Path to example dotenv file to substitute variables for." + type: string + default: .env.example environment: description: "The environment to use for testing." required: false @@ -156,6 +160,8 @@ jobs: fi - name: Create .env file + env: + EXAMPLE_DOTENV: ${{ inputs.example_env_file_path }} run: | echo "Checking if ${EXAMPLE_DOTENV} exists" if [ -f ${EXAMPLE_DOTENV} ]; then