Change gears ⚙️ now we use 'releases' to publish #6
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: Publish Postgres Image | |
on: | |
push: | |
branches: | |
- main | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Docker Compose | |
uses: isbang/[email protected] | |
with: | |
compose-file: "./docker-compose.yml" | |
- name: Start containers | |
run: docker-compose up -d | |
- name: Wait for containers to start | |
run: sleep 10 | |
- name: Create Tiled catalog | |
run: docker exec -i tiled-test-db tiled catalog init postgresql+asyncpg://postgres:secret@postgres:5432 | |
- name: Dump sql data into binary format | |
run: docker exec -i postgres /bin/bash -c "PGPASSWORD=secret pg_dump --username postgres postgres" > tiled_test_db_pg.sql | |
- name: Stop containers | |
run: docker-compose down | |