diff --git a/.gitea/actions/create/action.yml b/.gitea/actions/create/action.yml index fd615bc..34b399f 100644 --- a/.gitea/actions/create/action.yml +++ b/.gitea/actions/create/action.yml @@ -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 }} diff --git a/.gitea/actions/create/postgres-template.yaml b/.gitea/actions/create/postgres-template.yaml index 1946f28..a9f21b2 100644 --- a/.gitea/actions/create/postgres-template.yaml +++ b/.gitea/actions/create/postgres-template.yaml @@ -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"]