-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (33 loc) · 1001 Bytes
/
container.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Container
on:
- pull_request
- push
permissions:
contents: read
jobs:
container:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
postgresql:
- 12
- 13
- 15
steps:
- uses: actions/checkout@v4
- name: Build container
uses: docker/build-push-action@v5
with:
file: Containerfile
tags: postgresql-evr:${{ matrix.postgresql }}
build-args: |
POSTGRESQL_VERSION=${{ matrix.postgresql }}
- name: Run container
run: docker run -p 5432:5432 -e POSTGRES_PASSWORD=password --detach --name postgres postgresql-evr:${{ matrix.postgresql }}
- name: Wait for the container to start up
run: 'while ! docker exec postgres pg_isready; do sleep 1; done'
- name: Create extension in the container
run: psql --host localhost --username postgres --command 'create extension evr;'
env:
PGPASSWORD: password