mirror of
https://github.com/esauflores/databases.git
synced 2026-03-09 06:30:34 +00:00
fix: refactor GitHub Actions workflow to define environment variables and strategy explicitly
This commit is contained in:
24
.github/workflows/test-and-push.yml
vendored
24
.github/workflows/test-and-push.yml
vendored
@@ -9,13 +9,19 @@ jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy: &db-matrix
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- db: postgres
|
||||
variant: base
|
||||
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: jdx/mise-action@v3
|
||||
@@ -32,13 +38,27 @@ jobs:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy: *db-matrix
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- db: postgres
|
||||
variant: base
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user