sqlx: make migration location configurable
All checks were successful
Publish SQLx container / publish (push) Successful in 4m50s

This commit is contained in:
Adrian Wannenmacher 2023-12-11 17:55:32 +01:00
parent 850172831e
commit 289814b646
Signed by: tfld
GPG Key ID: 19D986ECB1E492D5
2 changed files with 5 additions and 1 deletions

View File

@ -10,4 +10,4 @@ RUN cargo install sqlx-cli \
FROM alpine
COPY --from=build /usr/local/cargo/bin/sqlx /usr/local/bin/sqlx
CMD sqlx migrate run --source /migrations
CMD sqlx migrate run --source $MIGRATIONS

View File

@ -4,8 +4,12 @@ inputs:
database-url:
description: Where to find the database
required: true
migrations:
description: Where to find the migrations
default: /migrations
runs:
using: docker
image: docker://git.tfld.dev/tfld/tools-sqlx
env:
DATABASE_URL: ${{ inputs.database-url }}
MIGRATIONS: ${{ inputs.migrations }}