diff --git a/README.md b/README.md index ebf0f0e..28e8fc9 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,10 @@ Uses the default command `up` and does not check in the database schema. ... steps: - name: "Run migrations" - uses: dwin/dbmate-action@v1.15 + uses: dwin/dbmate-action@v2024.09.17 with: command: 'up' + dbmate_version: '2.21' # optional, defaults to latest env: DATABASE_URL: postgres://postgres:changeme@postgres:5432/postgres # or ${{ secrets.DATABASE_URL }} DBMATE_MIGRATIONS_DIR: "./migrations" @@ -45,7 +46,7 @@ steps: ... steps: - name: "Run migrations" - uses: dwin/dbmate-action@v1.15 + uses: dwin/dbmate-action@v2024.09.17 with: command: 'up' env: diff --git a/action.yml b/action.yml index f0148d2..d02e33b 100644 --- a/action.yml +++ b/action.yml @@ -6,11 +6,15 @@ branding: description: 'Run Dbmate database migration tool' inputs: command: - description: 'Dbmate command to run' + description: 'Dbmate command to run (optional, defaults to "--help"). Example: up' required: false default: '--help' + dbmate_version: + description: 'Dbmate version to use (optional, defaults to latest). Example: 2.21' + required: false + default: 'latest' runs: using: 'docker' - image: 'docker://ghcr.io/amacneil/dbmate:1.15' + image: docker://ghcr.io/amacneil/dbmate:${{ inputs.dbmate_version }} args: - ${{ inputs.command }}