Skip to content

Commit

Permalink
fix: configurable example dotenv file location
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Feb 24, 2024
1 parent 61cc310 commit 266524f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/remote_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test_compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 266524f

Please sign in to comment.