Skip to content

Commit 65d17c8

Browse files
authored
readme: deprecation notice (#10)
1 parent d15abdf commit 65d17c8

File tree

8 files changed

+178
-74
lines changed

8 files changed

+178
-74
lines changed

.github/workflows/Dockerfile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
FROM arigaio/atlas:latest-alpine as atlas
22

3-
FROM golang:1.20 as build
3+
FROM golang:1.21 as build
44

55
WORKDIR /go/src/app
66
COPY . .
77

88
RUN go mod download
99

10-
RUN CGO_ENABLED=0 go build -o /go/bin/app
11-
12-
FROM gcr.io/distroless/static-debian11
13-
14-
ENV PATH="/bin"
10+
RUN go build -o /go/bin/app
1511

1612
COPY --from=atlas /atlas /bin
1713

18-
COPY --from=build /go/bin/app /
19-
20-
CMD ["/app"]
14+
CMD ["/go/bin/app"]

.github/workflows/ci-go.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- uses: actions/checkout@v3
1010
- uses: actions/setup-go@v4
1111
with:
12-
go-version: "1.20"
12+
go-version: "1.21"
1313
- uses: actions/cache@v3
1414
with:
1515
path: |
@@ -29,7 +29,7 @@ jobs:
2929
- uses: actions/checkout@v3
3030
- uses: actions/setup-go@v4
3131
with:
32-
go-version: "1.20"
32+
go-version: "1.21"
3333
- uses: actions/cache@v3
3434
with:
3535
path: |
@@ -65,9 +65,8 @@ jobs:
6565
uses: ./internal/action
6666
with:
6767
url: sqlite://internal/testdata/test.db
68-
cloud-dir: migrations
68+
cloud-dir: deploy-action-test
6969
cloud-token: ${{ secrets.ATLAS_CLOUD_TEST_TOKEN }}
70-
cloud-url: ${{ secrets.ATLAS_CLOUD_TEST_URL }}
7170
- name: Check Error and Compare Current with Target
7271
run: |
7372
error_output="${{ steps.sanity.outputs.error }}"

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# atlas-deploy-action
22

3+
## Deprecation Notice
4+
5+
This action has been deprecated in favor of the `ariga/atlas-action/migrate/apply` action.
6+
7+
Please see [the docs](https://github.com/ariga/atlas-action#arigaatlas-actionmigrateapply) for more
8+
details.
9+
10+
## About
11+
312
A GitHub Action to deploy versioned migrations with [Atlas](https://atlasgo.io).
413

514
## Supported Workflows

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'atlas-deploy-action'
2-
description: 'Deploy your database schema migrations using Atlas'
2+
description: 'Deprecated. Deploy your database schema migrations using Atlas'
33
branding:
44
icon: database
55
author: 'Ariga'

go.mod

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,45 @@
11
module github.com/ariga/atlas-deploy-action
22

3-
go 1.20
3+
go 1.21
4+
5+
toolchain go1.21.2
46

57
require (
6-
ariga.io/atlas-go-sdk v0.1.0
8+
ariga.io/atlas v0.14.3-0.20231010104048-0c071bfc9161
9+
ariga.io/atlas-go-sdk v0.1.1-0.20231011100517-4211cc50a84f
710
github.com/mattn/go-sqlite3 v1.14.17
811
github.com/sethvargo/go-githubactions v1.1.0
912
github.com/stretchr/testify v1.8.4
1013
)
1114

1215
require (
13-
ariga.io/atlas v0.12.1 // indirect
14-
github.com/agext/levenshtein v1.2.1 // indirect
15-
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
16+
ariga.io/atlas/cmd/atlas v0.13.2-0.20231010104048-0c071bfc9161 // indirect
17+
github.com/agext/levenshtein v1.2.3 // indirect
18+
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect
19+
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
20+
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
1621
github.com/davecgh/go-spew v1.1.1 // indirect
1722
github.com/go-openapi/inflect v0.19.0 // indirect
18-
github.com/google/go-cmp v0.5.8 // indirect
19-
github.com/hashicorp/hcl/v2 v2.10.0 // indirect
20-
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect
23+
github.com/golang/protobuf v1.5.3 // indirect
24+
github.com/google/go-cmp v0.5.9 // indirect
25+
github.com/hashicorp/hcl/v2 v2.18.1 // indirect
26+
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
27+
github.com/pganalyze/pg_query_go/v4 v4.2.3 // indirect
28+
github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 // indirect
29+
github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c // indirect
30+
github.com/pingcap/log v1.1.0 // indirect
31+
github.com/pingcap/tidb/parser v0.0.0-20231010115255-ec2731b8f539 // indirect
2132
github.com/pmezard/go-difflib v1.0.0 // indirect
33+
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
2234
github.com/sethvargo/go-envconfig v0.9.0 // indirect
23-
github.com/zclconf/go-cty v1.8.0 // indirect
24-
golang.org/x/text v0.8.0 // indirect
35+
github.com/zclconf/go-cty v1.14.1 // indirect
36+
go.uber.org/atomic v1.11.0 // indirect
37+
go.uber.org/multierr v1.11.0 // indirect
38+
go.uber.org/zap v1.26.0 // indirect
39+
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
40+
golang.org/x/mod v0.13.0 // indirect
41+
golang.org/x/text v0.13.0 // indirect
42+
google.golang.org/protobuf v1.31.0 // indirect
43+
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
2544
gopkg.in/yaml.v3 v3.0.1 // indirect
2645
)

go.sum

Lines changed: 127 additions & 46 deletions
Large diffs are not rendered by default.

main.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ var (
2222

2323
func main() {
2424
act := githubactions.New()
25+
act.Warningf("This action is deprecated. Please use ariga/atlas-action/migrate/apply instead. " +
26+
"For details see: https://github.com/ariga/atlas-action#arigaatlas-actionmigrateapply")
2527
inp, err := Load(act)
2628
if err != nil {
2729
act.Fatalf("failed to load input: %v", err)
@@ -105,7 +107,7 @@ func Load(act *githubactions.Action) (*Input, error) {
105107
}
106108

107109
// Run runs the "migrate apply" for the input.
108-
func Run(ctx context.Context, i *Input) (*atlasexec.ApplyReport, error) {
110+
func Run(ctx context.Context, i *Input) (*atlasexec.MigrateApply, error) {
109111
wd, err := os.Getwd()
110112
if err != nil {
111113
return nil, err
@@ -114,7 +116,7 @@ func Run(ctx context.Context, i *Input) (*atlasexec.ApplyReport, error) {
114116
if err != nil {
115117
return nil, err
116118
}
117-
params := &atlasexec.ApplyParams{
119+
params := &atlasexec.MigrateApplyParams{
118120
URL: i.URL,
119121
Amount: i.Amount,
120122
TxMode: i.TxMode,
@@ -137,5 +139,5 @@ func Run(ctx context.Context, i *Input) (*atlasexec.ApplyReport, error) {
137139
params.ConfigURL = cfg
138140
params.Env = "atlas"
139141
}
140-
return client.Apply(ctx, params)
142+
return client.MigrateApply(ctx, params)
141143
}

main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func fakeCloud(t *testing.T) *httptest.Server {
178178
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
179179
require.Equal(t, "Bearer token", r.Header.Get("Authorization"))
180180
// nolint:errcheck
181-
fmt.Fprintf(w, `{"data":{"dir":{"content":%q}}}`, base64.StdEncoding.EncodeToString(ad))
181+
fmt.Fprintf(w, `{"data":{"dirState":{"content":%q}}}`, base64.StdEncoding.EncodeToString(ad))
182182
}))
183183
return srv
184184
}

0 commit comments

Comments
 (0)