File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ *
2+ ! go.mod
3+ ! go.sum
4+ ! * .go
5+ ! sql-migrate /* .go
6+ ! sqlparse /* .go
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ release :
5+ types : [ created ]
6+
7+ jobs :
8+ releases-matrix :
9+ name : Release Go Binary
10+ runs-on : ubuntu-latest
11+ strategy :
12+ matrix :
13+ goos : [ linux, windows, darwin ]
14+ goarch : [ amd64 ]
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v2
18+ - uses : wangyoucao577/go-release-action@v1.15
19+ with :
20+ github_token : ${{ secrets.GITHUB_TOKEN }}
21+ goos : ${{ matrix.goos }}
22+ goarch : ${{ matrix.goarch }}
23+ goversion : 1.16
24+ pre_command : export CGO_ENABLED=0
25+ project_path : " ./sql-migrate"
Original file line number Diff line number Diff line change 11. * .swp
22* .test
33.idea
4+ /vendor /
45
56/sql-migrate /test.db
67/test.db
Original file line number Diff line number Diff line change 1+ ARG GO_VERSION=1.16.2
2+ ARG ALPINE_VERSION=3.12
3+
4+ # ## Vendor
5+ FROM golang:${GO_VERSION} as vendor
6+ COPY . /project
7+ WORKDIR /project
8+ RUN go mod tidy && go mod vendor
9+
10+ # ## Build binary
11+ FROM golang:${GO_VERSION} as build-binary
12+ COPY . /project
13+ COPY --from=vendor /project/vendor /project/vendor
14+ WORKDIR /project
15+ RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on go build \
16+ -v \
17+ -mod vendor \
18+ -o /project/bin/sql-migrate \
19+ /project/sql-migrate
20+
21+ # ## Image
22+ FROM alpine:${ALPINE_VERSION} as image
23+ COPY --from=build-binary /project/bin/sql-migrate /usr/local/bin/sql-migrate
24+ RUN chmod +x /usr/local/bin/sql-migrate
25+ ENTRYPOINT ["sql-migrate" ]
Original file line number Diff line number Diff line change 11module github.com/rubenv/sql-migrate
22
3- go 1.11
3+ go 1.16
44
55require (
6- github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0
7- github.com/go-sql-driver/mysql v1.4.1
8- github.com/gobuffalo/packr/v2 v2.7.1
9- github.com/godror/godror v0.13.3
10- github.com/lib/pq v1.2.0
11- github.com/mattn/go-oci8 v0.0.7
12- github.com/mattn/go-sqlite3 v1.12.0
13- github.com/mitchellh/cli v1.0.0
14- github.com/olekukonko/tablewriter v0.0.2
15- github.com/ziutek/mymysql v1.5.4 // indirect
16- google.golang.org/appengine v1.6.5 // indirect
17- gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
6+ github.com/denisenkom/go-mssqldb v0.9.0
7+ github.com/go-sql-driver/mysql v1.5.0
8+ github.com/gobuffalo/packr/v2 v2.8.1
9+ github.com/godror/godror v0.24.2
10+ github.com/lib/pq v1.10.0
11+ github.com/mattn/go-oci8 v0.1.1
12+ github.com/mattn/go-sqlite3 v1.14.6
13+ github.com/mitchellh/cli v1.1.2
14+ github.com/olekukonko/tablewriter v0.0.5
15+ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
1816 gopkg.in/gorp.v1 v1.7.2
19- gopkg.in/yaml.v2 v2.2.5
17+ gopkg.in/yaml.v2 v2.4.0
2018)
You can’t perform that action at this time.
0 commit comments