File tree 2 files changed +58
-2
lines changed
2 files changed +58
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : release image
2
+ on :
3
+ push :
4
+ tags :
5
+ - v*
6
+ env :
7
+ REGISTRY : ghcr.io
8
+
9
+ jobs :
10
+ build-image :
11
+ runs-on : ubuntu-latest
12
+ permissions :
13
+ contents : read
14
+ packages : write
15
+ steps :
16
+ - uses : actions/checkout@v4
17
+ - uses : docker/metadata-action@v3
18
+ id : meta
19
+ with :
20
+ images : ${{ env.REGISTRY }}/goccy/go-zetasql
21
+ tags : |
22
+ type=semver,pattern={{version}}
23
+ type=semver,pattern={{major}}.{{minor}}
24
+ - name : setup docker buildx
25
+ uses : docker/setup-buildx-action@v2
26
+ - name : cache for linux
27
+ uses : actions/cache@v3
28
+ if : runner.os == 'Linux'
29
+ with :
30
+ path : |
31
+ ~/.cache/go-build
32
+ ~/go/pkg/mod
33
+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
34
+ restore-keys : |
35
+ ${{ runner.os }}-go-
36
+ - uses : docker/login-action@v2
37
+ with :
38
+ registry : ${{ env.REGISTRY }}
39
+ username : ${{ github.actor }}
40
+ password : ${{ secrets.GITHUB_TOKEN }}
41
+ - uses : docker/build-push-action@v3
42
+ with :
43
+ context : .
44
+ push : true
45
+ tags : ${{ steps.meta.outputs.tags }}
46
+ labels : ${{ steps.meta.outputs.labels }}
47
+ cache-from : type=local,src=~/.cache/go-build
48
+ build-args : |
49
+ VERSION=v${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
Original file line number Diff line number Diff line change 1
1
FROM golang:1.21-bookworm
2
2
3
+ ARG VERSION
4
+
3
5
RUN apt-get update && apt-get install -y --no-install-recommends clang
4
6
5
7
ENV CGO_ENABLED 1
6
8
ENV CXX clang++
7
9
8
- COPY . /go-zetasql
10
+ WORKDIR /work
11
+
12
+ COPY ./go.* ./
13
+ RUN go mod download
14
+
15
+ COPY . ./
9
16
10
- WORKDIR /go-zetasql
17
+ RUN go install .
You can’t perform that action at this time.
0 commit comments