mirror of
https://github.com/esauflores/databases.git
synced 2026-03-09 14:34:00 +00:00
61 lines
1.3 KiB
YAML
61 lines
1.3 KiB
YAML
name: Test and Push To Registry
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
tags: ["v*"]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- db: postgres
|
|
variant: base
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: jdx/mise-action@v3
|
|
|
|
- name: Test
|
|
run: just test ${{ matrix.db }} ${{ matrix.variant }}
|
|
|
|
- name: Cleanup
|
|
if: always()
|
|
run: just down-all ${{ matrix.db }} ${{ matrix.variant }}
|
|
|
|
publish:
|
|
needs: test
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- db: postgres
|
|
variant: base
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: jdx/mise-action@v3
|
|
|
|
- name: Login to registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ secrets.REGISTRY_URL }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Push
|
|
env:
|
|
REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
|
|
run: just push ${{ matrix.db }} ${{ matrix.variant }}
|
|
|
|
- name: Cleanup
|
|
if: always()
|
|
run: just down-all ${{ matrix.db }} ${{ matrix.variant }}
|