From 2b930c5d5ab4c049b661cc41968ace85a76be899 Mon Sep 17 00:00:00 2001 From: Darwin <172265+dwin@users.noreply.github.com> Date: Tue, 17 Sep 2024 12:53:36 -0400 Subject: [PATCH 1/4] use latest for main --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index f0148d2..20aed79 100644 --- a/action.yml +++ b/action.yml @@ -11,6 +11,6 @@ inputs: default: '--help' runs: using: 'docker' - image: 'docker://ghcr.io/amacneil/dbmate:1.15' + image: 'docker://ghcr.io/amacneil/dbmate:latest' args: - ${{ inputs.command }} From 042316713ab8d02a3dc2037636a2ae040a636b3b Mon Sep 17 00:00:00 2001 From: Darwin <172265+dwin@users.noreply.github.com> Date: Tue, 17 Sep 2024 12:56:12 -0400 Subject: [PATCH 2/4] update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ebf0f0e..f672c5a 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ 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 ## to use the latest version of dbmate or specify a version use @ such as dwin/dbmate-action@v2 with: command: 'up' env: From b8c940f1a5f01960390d5ce9f1367731d5527de8 Mon Sep 17 00:00:00 2001 From: Darwin <172265+dwin@users.noreply.github.com> Date: Tue, 17 Sep 2024 13:00:03 -0400 Subject: [PATCH 3/4] Readme update --- README.md | 3 ++- action.yml | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f672c5a..ff73c3c 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 ## to use the latest version of dbmate or specify a version use @ such as dwin/dbmate-action@v2 + 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" diff --git a/action.yml b/action.yml index 20aed79..7fcaf20 100644 --- a/action.yml +++ b/action.yml @@ -9,8 +9,12 @@ inputs: description: 'Dbmate command to run' required: false default: '--help' + dbmate_version: + description: 'Dbmate version to use' + required: false + default: 'latest' runs: using: 'docker' - image: 'docker://ghcr.io/amacneil/dbmate:latest' + image: 'docker://ghcr.io/amacneil/dbmate:${{ inputs.dbmate_version }}' args: - ${{ inputs.command }} From 2421a8940b54bb323bb82670e88cbad88b1413fa Mon Sep 17 00:00:00 2001 From: Darwin <172265+dwin@users.noreply.github.com> Date: Tue, 17 Sep 2024 13:10:54 -0400 Subject: [PATCH 4/4] cleanup --- README.md | 2 +- action.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ff73c3c..28e8fc9 100644 --- a/README.md +++ b/README.md @@ -46,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 7fcaf20..d02e33b 100644 --- a/action.yml +++ b/action.yml @@ -6,15 +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' + 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:${{ inputs.dbmate_version }}' + image: docker://ghcr.io/amacneil/dbmate:${{ inputs.dbmate_version }} args: - ${{ inputs.command }}