chore: Add GitHub Actions workflow for database testing and publishing

This commit is contained in:
2026-03-07 04:04:36 +07:00
parent ae7d9f9819
commit 12e1162ea0

54
.github/workflows/test-and-push.yml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: Database Test
on:
push:
tags:
- "v*"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
db: [postgres]
env:
### Postgres ###
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_PORT: 5432
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v3
- name: Test ${{ matrix.db }}
run: just test ${{ matrix.db }}
publish:
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
db: [postgres]
env:
REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
VERSION: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v3
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Publish ${{ matrix.db }}
run: just publish ${{ matrix.db }}