Skip to content

Commit ff70f10

Browse files
committed
feat: setup-postgres image-tag input
1 parent aa36d1b commit ff70f10

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

.changeset/smooth-plants-train.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"setup-postgres": major
3+
---
4+
5+
feat: add configurable image-tag input (note: this is a non-breaking change but wanted to bump it to 1.0.0)

actions/setup-postgres/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ description:
33
Setup postgres docker container via docker-compose, allowing usage of a custom
44
command, see https://github.com/orgs/community/discussions/26688
55
inputs:
6+
image-tag:
7+
description: |
8+
The image tag from the dockerhub (https://hub.docker.com/_/postgres) to use as the
9+
postgres image. Defaults to "14-alpine".
10+
default: "14-alpine"
11+
612
print-logs:
713
description: |
814
Whether to print the logs of the postgres service to the console and a file.
@@ -39,6 +45,7 @@ runs:
3945
shell: bash
4046
working-directory: ${{ github.action_path }}
4147
env:
48+
IMAGE_TAG: ${{ inputs.image-tag }}
4249
USE_TMPFS: ${{ inputs.tmpfs }}
4350
run: |
4451
if [ "${USE_TMPFS}" == "true" ]; then

actions/setup-postgres/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
ports:
55
- "5432:5432"
66
container_name: cl_pg
7-
image: postgres:14-alpine
7+
image: postgres:${IMAGE_TAG}
88
command: postgres ${POSTGRES_OPTIONS}
99
env_file:
1010
- .env

0 commit comments

Comments
 (0)