parametrize container
This commit is contained in:
@ -2,6 +2,18 @@ name: Run pg for tests
|
||||
inputs:
|
||||
service_name:
|
||||
required: true
|
||||
postgres_version:
|
||||
required: false
|
||||
default: 14
|
||||
postgres_db:
|
||||
required: false
|
||||
default: test
|
||||
postgres_user:
|
||||
required: false
|
||||
default: test
|
||||
postgres_password:
|
||||
required: false
|
||||
default: test
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
@ -14,3 +26,7 @@ runs:
|
||||
POD_NAME: ${{ inputs.service_name }}
|
||||
APP_NAME: ${{ inputs.service_name }}
|
||||
SERVICE_NAME: ${{ inputs.service_name }}
|
||||
POSTGRES_VERSION: ${{ inputs.postgres_version }}
|
||||
POSTGRES_DB: ${{ inputs.postgres_db }}
|
||||
POSTGRES_USER: ${{ inputs.postgres_user }}
|
||||
POSTGRES_PASSWORD: ${{ inputs.postgres_password }}
|
||||
|
||||
@ -7,16 +7,16 @@ metadata:
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:15
|
||||
image: postgres:${POSTGRES_VERSION}
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: test
|
||||
value: ${POSTGRES_PASSWORD}
|
||||
- name: POSTGRES_USER
|
||||
value: test
|
||||
value: ${POSTGRES_USER}
|
||||
- name: POSTGRES_DB
|
||||
value: test
|
||||
value: ${POSTGRES_DB}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["pg_isready", "-U", "postgres"]
|
||||
|
||||
Reference in New Issue
Block a user