diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index f9e98fe..ae1f6de 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -2,8 +2,8 @@ name: Publish Database Images on: push: - branches: - - main + tags: + - "*.*.*" jobs: build: @@ -34,5 +34,18 @@ jobs: # Specify Database Connection TILED_TEST_POSTGRESQL_URI: postgresql+asyncpg://postgres:secret@localhost: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: Publish .sql files to github release with action + uses: softprops/action-gh-release@v1 + with: + files: | + tiled_test_db_pg.sql + tag_name: ${{ github.ref }} + body: | + ${{ github.ref }} : ${{ github.event.head_commit.message }} + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index f58bee6..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,20 +0,0 @@ - version: '3' - services: - postgres: - container_name: postgres - image: postgres - environment: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: secret - ports: - - "5432:5432" - tiled-test-db: - container_name: tiled-test-db - image: ghcr.io/bluesky/tiled:main - environment: - TILED_SINGLE_USER_API_KEY: secret - TILED_TEST_POSTGRESQL_URI: postgresql+asyncpg://postgres:secret@postgres:5432 - depends_on: - - postgres - ports: - - "8000:8000" \ No newline at end of file diff --git a/generate_data.py b/scripts/generate_data.py similarity index 100% rename from generate_data.py rename to scripts/generate_data.py