File tree 14 files changed +470
-299
lines changed
14 files changed +470
-299
lines changed Original file line number Diff line number Diff line change
1
+ name : golangci-lint
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ - master
7
+ pull_request :
8
+
9
+ permissions :
10
+ contents : read
11
+ # Optional: allow read access to pull request. Use with `only-new-issues` option.
12
+ # pull-requests: read
13
+
14
+ jobs :
15
+ golangci :
16
+ name : lint
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - uses : actions/checkout@v4
20
+ - uses : actions/setup-go@v5
21
+ with :
22
+ go-version : stable
23
+ - name : golangci-lint
24
+ uses : golangci/golangci-lint-action@v6
25
+ with :
26
+ version : v1.60
Original file line number Diff line number Diff line change
1
+ name : goreleaser
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' *'
7
+
8
+ permissions :
9
+ contents : write
10
+
11
+ jobs :
12
+ goreleaser :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ -
16
+ name : Checkout
17
+ uses : actions/checkout@v4
18
+ with :
19
+ fetch-depth : 0
20
+ -
21
+ name : Set up Go
22
+ uses : actions/setup-go@v5
23
+ -
24
+ name : Run GoReleaser
25
+ uses : goreleaser/goreleaser-action@v6
26
+ with :
27
+ args : release --clean
28
+ env :
29
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 18
18
-
uses :
ko-build/[email protected]
19
19
- run : |
20
20
tag=$(echo ${{ github.ref }} | cut -c11-)
21
- ko build -t ${tag} -B
21
+ ko build -t latest, ${tag} -B
Original file line number Diff line number Diff line change
1
+ # This is an example .goreleaser.yml file with some sensible defaults.
2
+ # Make sure to check the documentation at https://goreleaser.com
3
+
4
+ # The lines below are called `modelines`. See `:help modeline`
5
+ # Feel free to remove those if you don't want/need to use them.
6
+ # yaml-language-server: $schema=https://goreleaser.com/static/schema.json
7
+ # vim: set ts=2 sw=2 tw=0 fo=cnqoj
8
+
9
+ version : 2
10
+
11
+ before :
12
+ hooks :
13
+ # You may remove this if you don't use go modules.
14
+ - go mod tidy
15
+ # you may remove this if you don't need go generate
16
+ - go generate ./...
17
+
18
+ builds :
19
+ - env :
20
+ - CGO_ENABLED=0
21
+ goos :
22
+ - linux
23
+ - windows
24
+ - darwin
25
+
26
+ archives :
27
+ - format : tar.gz
28
+ # this name template makes the OS and Arch compatible with the results of `uname`.
29
+ name_template : >-
30
+ {{ .ProjectName }}_
31
+ {{- title .Os }}_
32
+ {{- if eq .Arch "amd64" }}x86_64
33
+ {{- else if eq .Arch "386" }}i386
34
+ {{- else }}{{ .Arch }}{{ end }}
35
+ {{- if .Arm }}v{{ .Arm }}{{ end }}
36
+ # use zip for windows archives
37
+ format_overrides :
38
+ - goos : windows
39
+ format : zip
40
+
41
+ changelog :
42
+ sort : asc
43
+ filters :
44
+ exclude :
45
+ - " ^docs:"
46
+ - " ^test:"
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ This tool is still pre-release quality and none of guarantees.
19
19
20
20
## Usage
21
21
22
+ Local build requires Go 1.23.
23
+
22
24
```
23
25
$ go install github.com/apstndb/execspansql@latest
24
26
```
@@ -56,6 +58,15 @@ Arguments:
56
58
database: (required) ID of the database.
57
59
```
58
60
61
+ You can use container image in GitHub Container Registry.
62
+ ```
63
+ $ docker run --rm -t -v "${HOME}/.config/gcloud/application_default_credentials.json:/home/nonroot/.config/gcloud/application_default_credentials.json:ro" \
64
+ ghcr.io/apstndb/execspansql/execspansql:latest -p ${SPANNER_PROJECT} -i ${SPANNER_INSTANCE} ${SPANNER_DATABASE} --sql 'SELECT 1'
65
+ # or use specific version
66
+ $ docker run --rm -t -v "${HOME}/.config/gcloud/application_default_credentials.json:/home/nonroot/.config/gcloud/application_default_credentials.json:ro" \
67
+ ghcr.io/apstndb/execspansql/execspansql:v0.3.3 -p ${SPANNER_PROJECT} -i ${SPANNER_INSTANCE} ${SPANNER_DATABASE} --sql 'SELECT 1'
68
+ ```
69
+
59
70
## Notable features
60
71
61
72
There are examples omitting some required options.
You can’t perform that action at this time.
0 commit comments