Postgres_Deploy #16
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: Postgres_Deploy | |
on: workflow_dispatch | |
env: | |
DBS: "${{ vars.DEV_DB }},${{ vars.PROD_DB }}" | |
POSTGRES_USER: ${{ vars.POSTGRES_USER }} | |
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | |
DATABASE: ${{ vars.POSTGRES_DB }} | |
PGADMIN_DEFAULT_EMAIL: ${{ vars.PGADMIN_DEFAULT_EMAIL }} | |
PGADMIN_DEFAULT_PASSWORD: ${{ secrets.PGADMIN_DEFAULT_PASSWORD }} | |
jobs: | |
deploy: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Docker compouse DOWN old containers | |
run: docker compose -f docker-compose.db.yml down -v | |
- name: Docker compouse UP new containers | |
run: docker compose -f docker-compose.db.yml up -d --build | |
- name: Clean up old docker resources | |
run: | | |
docker container prune -f | |
docker image prune -f |