Skip to content

Commit

Permalink
schema/push: support desired schema URL(s) input (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
giautm committed Sep 24, 2024
1 parent 50a37c8 commit e8b9e79
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ Push a schema to [Atlas Registry](https://atlasgo.io/registry) with an optional
#### Inputs

* `schema-name` - The name (slug) of the schema repository in [Atlas Registry](https://atlasgo.io/registry).
* `url` - Desired schema URL(s) to push. For example: `file://schema.hcl`.
* `tag` - The tag to apply to the pushed schema. By default, the current git commit hash is used.
* `latest` - Whether to implicitly push the `latest` tag. True by default.
* `dev-url` - The URL of the dev-database to use for analysis. For example: `mysql://root:pass@localhost:3306/dev`.
Expand Down
1 change: 1 addition & 0 deletions atlasaction/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ func (a *Actions) SchemaPush(ctx context.Context) error {
Name: a.GetInput("schema-name"),
Description: a.GetInput("description"),
Version: a.GetInput("version"),
URL: a.GetArrayInput("url"),
DevURL: a.GetInput("dev-url"),
Context: a.GetRunContext(ctx, tc),
ConfigURL: a.GetInput("config"),
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.23

require (
ariga.io/atlas v0.21.2-0.20240418081819-02b3f6239b04
ariga.io/atlas-go-sdk v0.6.2
ariga.io/atlas-go-sdk v0.6.3
github.com/alecthomas/kong v0.8.0
github.com/mattn/go-sqlite3 v1.14.17
github.com/mitchellh/mapstructure v1.1.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ariga.io/atlas v0.21.2-0.20240418081819-02b3f6239b04 h1:YF3qiqtnhn+y4tfhZKTfZKfizpjqHYt7rWPUb+eA4ZA=
ariga.io/atlas v0.21.2-0.20240418081819-02b3f6239b04/go.mod h1:VPlcXdd4w2KqKnH54yEZcry79UAhpaWaxEsmn5JRNoE=
ariga.io/atlas-go-sdk v0.6.2 h1:u7IAH6FqXRLpbW67Zw3jTy3Mz7lCB/rhbdPCorFhYTY=
ariga.io/atlas-go-sdk v0.6.2/go.mod h1:9Q+/04PVyJHUse1lEE9Kp6E18xj/6mIzaUTcWYSjSnQ=
ariga.io/atlas-go-sdk v0.6.3 h1:szfRe9bAhMRfRapOVt9I0Ifdx6ROb7Cqmt/W4rPs3hw=
ariga.io/atlas-go-sdk v0.6.3/go.mod h1:9Q+/04PVyJHUse1lEE9Kp6E18xj/6mIzaUTcWYSjSnQ=
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo=
Expand Down
4 changes: 4 additions & 0 deletions schema/push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ inputs:
The name (slug) of the schema repository in Atlas Registry.
Read more in Atlas website: https://atlasgo.io/registry.
required: false
url:
description: |
Desired schema URL(s) to push. For example: `file://schema.lt.hcl`.
required: false
description:
description: The description of the schema changes.
required: false
Expand Down

0 comments on commit e8b9e79

Please sign in to comment.