sqlx: make migration location configurable
All checks were successful
Publish SQLx container / publish (push) Successful in 4m50s
All checks were successful
Publish SQLx container / publish (push) Successful in 4m50s
This commit is contained in:
parent
850172831e
commit
289814b646
@ -10,4 +10,4 @@ RUN cargo install sqlx-cli \
|
|||||||
FROM alpine
|
FROM alpine
|
||||||
COPY --from=build /usr/local/cargo/bin/sqlx /usr/local/bin/sqlx
|
COPY --from=build /usr/local/cargo/bin/sqlx /usr/local/bin/sqlx
|
||||||
|
|
||||||
CMD sqlx migrate run --source /migrations
|
CMD sqlx migrate run --source $MIGRATIONS
|
||||||
|
@ -4,8 +4,12 @@ inputs:
|
|||||||
database-url:
|
database-url:
|
||||||
description: Where to find the database
|
description: Where to find the database
|
||||||
required: true
|
required: true
|
||||||
|
migrations:
|
||||||
|
description: Where to find the migrations
|
||||||
|
default: /migrations
|
||||||
runs:
|
runs:
|
||||||
using: docker
|
using: docker
|
||||||
image: docker://git.tfld.dev/tfld/tools-sqlx
|
image: docker://git.tfld.dev/tfld/tools-sqlx
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: ${{ inputs.database-url }}
|
DATABASE_URL: ${{ inputs.database-url }}
|
||||||
|
MIGRATIONS: ${{ inputs.migrations }}
|
||||||
|
Loading…
Reference in New Issue
Block a user