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 }}