From 289814b646a107c7faf91ac6a3c57d31a6657617 Mon Sep 17 00:00:00 2001 From: Adrian Wannenmacher Date: Mon, 11 Dec 2023 17:55:32 +0100 Subject: [PATCH] sqlx: make migration location configurable --- sqlx/Dockerfile | 2 +- sqlx/action.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sqlx/Dockerfile b/sqlx/Dockerfile index 5e56025..7115911 100644 --- a/sqlx/Dockerfile +++ b/sqlx/Dockerfile @@ -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 diff --git a/sqlx/action.yml b/sqlx/action.yml index cc90885..467fa06 100644 --- a/sqlx/action.yml +++ b/sqlx/action.yml @@ -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 }}