File tree 3 files changed +24
-13
lines changed
3 files changed +24
-13
lines changed Original file line number Diff line number Diff line change 16
16
uses : actions/checkout@v2
17
17
- name : Unshallow
18
18
run : git fetch --prune --unshallow
19
+ - name : Docker login to Github Packages
20
+ uses : docker/login-action@v1
21
+ with :
22
+ registry : ghcr.io
23
+ username : ${{ github.actor }}
24
+ password : ${{ secrets.GITHUB_TOKEN }}
19
25
- name : Set up Go
20
26
uses : actions/setup-go@v1
21
27
with :
Original file line number Diff line number Diff line change 7
7
ldflags :
8
8
- -X github.com/vmware-tanzu/asset-relocation-tool-for-kubernetes/cmd.Version={{ .Version }}
9
9
binary : relok8s
10
+ dockers :
11
+ -
12
+ dockerfile : Dockerfile
13
+ image_templates :
14
+ - " ghcr.io/vmware-tanzu/asset-relocation-tool-for-kubernetes:{{ .Tag }}"
15
+ - " ghcr.io/vmware-tanzu/asset-relocation-tool-for-kubernetes:latest"
16
+ build_flag_templates :
17
+ - " --build-arg"
18
+ - " VERSION={{ .Version }}"
19
+ extra_files :
20
+ - assets/docker-login.sh
10
21
archives :
11
22
- replacements :
12
23
386 : i386
Original file line number Diff line number Diff line change 1
1
# Copyright 2021 VMware, Inc.
2
2
# SPDX-License-Identifier: BSD-2-Clause
3
- FROM golang:1.17 as builder
4
- ARG VERSION
5
-
6
- COPY . /asset-relocation-tool-for-kubernetes/
7
- ENV GOPATH=
8
- ENV PATH="${PATH}:/root/go/bin"
9
- WORKDIR /asset-relocation-tool-for-kubernetes/
10
- RUN make test && make build
11
3
4
+ # Distributes the relok8s binary previously crafted by the release process
5
+ # as part of the CI release action
12
6
FROM photon:4.0
7
+ ARG VERSION
8
+ ENV VERSION=${VERSION}
9
+
13
10
LABEL description="Asset Relocation Tool for Kubernetes"
14
11
LABEL maintainer=
"[email protected] "
15
-
16
- WORKDIR /
17
-
18
- RUN yum -y install diffutils jq
12
+ LABEL org.opencontainers.image.source https://github.com/vmware-tanzu/asset-relocation-tool-for-kubernetes
19
13
20
14
COPY assets/docker-login.sh /usr/local/bin/docker-login.sh
21
- COPY --from=builder /asset-relocation-tool-for-kubernetes/build/ relok8s /usr/local/bin/relok8s
15
+ COPY ./ relok8s /usr/local/bin
22
16
ENTRYPOINT ["/usr/local/bin/relok8s" ]
23
17
You can’t perform that action at this time.
0 commit comments