diff --git a/README.md b/README.md index e7261aac..1560f04a 100644 --- a/README.md +++ b/README.md @@ -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`. diff --git a/atlasaction/action.go b/atlasaction/action.go index b03b0f06..8ed4c852 100644 --- a/atlasaction/action.go +++ b/atlasaction/action.go @@ -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"), diff --git a/go.mod b/go.mod index 6b5802ab..e061664a 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 48e34f77..206c2ef6 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/schema/push/action.yml b/schema/push/action.yml index 0ae4d60b..e9c48082 100644 --- a/schema/push/action.yml +++ b/schema/push/action.yml @@ -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