rebuild the container once a week #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Container | |
on: | |
- pull_request | |
- push | |
permissions: | |
contents: read | |
jobs: | |
container: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build container | |
uses: docker/build-push-action@v5 | |
with: | |
file: Containerfile | |
tags: postgresql-evr:latest | |
- name: Run container | |
run: docker run -p 5432:5432 -e POSTGRES_PASSWORD=password --detach --name postgres postgresql-evr:latest | |
- 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 |