File tree 5 files changed +56
-71
lines changed
5 files changed +56
-71
lines changed Original file line number Diff line number Diff line change
1
+ name : ci
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' main'
7
+ pull_request :
8
+ branches :
9
+ - ' main'
10
+
11
+ jobs :
12
+ build-and-push-images :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ -
16
+ name : Checkout
17
+ uses : actions/checkout@v2
18
+ -
19
+ name : Docker meta
20
+ id : meta
21
+ uses : docker/metadata-action@v3
22
+ with :
23
+ images : |
24
+ dtzar/helm-kubectl
25
+ tags : |
26
+ type=ref,event=branch
27
+ type=ref,event=pr
28
+ type=semver,pattern={{version}}
29
+ type=semver,pattern={{major}}.{{minor}}
30
+ -
31
+ name : Set up Docker Buildx
32
+ uses : docker/setup-buildx-action@v1
33
+ -
34
+ name : Login to DockerHub
35
+ if : github.event_name != 'pull_request'
36
+ uses : docker/login-action@v1
37
+ with :
38
+ username : ${{ secrets.DOCKER_USERNAME }}
39
+ password : ${{ secrets.DOCKER_PASSWORD }}
40
+ -
41
+ name : Build and push
42
+ uses : docker/build-push-action@v2
43
+ with :
44
+ context : .
45
+ push : ${{ github.event_name != 'pull_request' }}
46
+ build-args : |
47
+ KUBE_VERSION=1.22.2
48
+ HELM_VERSION=3.7.0
49
+ tags : ${{ steps.meta.outputs.tags }}
50
+ labels : ${{ steps.meta.outputs.labels }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
FROM alpine:3
2
2
3
- ARG VCS_REF
4
- ARG BUILD_DATE
5
3
ARG KUBE_VERSION
6
4
ARG HELM_VERSION
7
5
8
- # Metadata
9
- LABEL org.label-schema.vcs-ref=$VCS_REF \
10
- org.label-schema.name="helm-kubectl" \
11
- org.label-schema.url="https://hub.docker.com/r/dtzar/helm-kubectl/" \
12
- org.label-schema.vcs-url="https://github.com/dtzar/helm-kubectl" \
13
- org.label-schema.build-date=$BUILD_DATE
14
-
15
6
RUN apk add --no-cache ca-certificates bash git openssh curl gettext jq bind-tools \
16
- && wget -q https://storage.googleapis.com/kubernetes-release/release/v1.21.2 /bin/linux/amd64/kubectl -O /usr/local/bin/kubectl \
7
+ && wget -q https://storage.googleapis.com/kubernetes-release/release/v${KUBE_VERSION} /bin/linux/amd64/kubectl -O /usr/local/bin/kubectl \
17
8
&& chmod +x /usr/local/bin/kubectl \
18
- && wget -q https://get.helm.sh/helm-v3.6.3 -linux-amd64.tar.gz -O - | tar -xzO linux-amd64/helm > /usr/local/bin/helm \
9
+ && wget -q https://get.helm.sh/helm-v${HELM_VERSION} -linux-amd64.tar.gz -O - | tar -xzO linux-amd64/helm > /usr/local/bin/helm \
19
10
&& chmod +x /usr/local/bin/helm \
20
11
&& chmod g+rwx /root \
21
12
&& mkdir /config \
Original file line number Diff line number Diff line change @@ -2,21 +2,17 @@ default: docker_build
2
2
3
3
DOCKER_IMAGE ?= dtzar/helm-kubectl
4
4
DOCKER_TAG ?= ` git rev-parse --abbrev-ref HEAD `
5
- VCS_REF ?= ` git rev-parse --short HEAD `
6
- BUILD_DATE ?= ` date -u +" %Y-%m-%dT%H:%M:%SZ" `
7
5
8
6
# Note: Latest version of kubectl may be found at:
9
7
# https://github.com/kubernetes/kubernetes/releases
10
- KUBE_VERSION = "1.21 .2"
8
+ KUBE_VERSION = "1.22 .2"
11
9
12
10
# Note: Latest version of helm may be found at
13
11
# https://github.com/kubernetes/helm/releases
14
- HELM_VERSION = "3.6.3 "
12
+ HELM_VERSION = "3.7.0 "
15
13
16
14
docker_build :
17
- @docker build \
18
- --build-arg VCS_REF=$(VCS_REF ) \
19
- --build-arg BUILD_DATE=$(BUILD_DATE ) \
15
+ @docker buildx build \
20
16
--build-arg KUBE_VERSION=$(KUBE_VERSION ) \
21
17
--build-arg HELM_VERSION=$(HELM_VERSION ) \
22
18
-t $(DOCKER_IMAGE ) :$(DOCKER_TAG ) .
Original file line number Diff line number Diff line change 9
9
10
10
Supported tags and release links
11
11
12
+ * [ 3.7.0] ( https://github.com/dtzar/helm-kubectl/releases/tag/3.7.0 ) - helm v3.7.0, kubectl v1.22.2, alpine 3.14
12
13
* [ 3.6.3] ( https://github.com/dtzar/helm-kubectl/releases/tag/3.6.3 ) - helm v3.6.3, kubectl v1.21.2, alpine 3.14
13
14
* [ 3.6.2] ( https://github.com/dtzar/helm-kubectl/releases/tag/3.6.2 ) - helm v3.6.2, kubectl v1.21.2, alpine 3.14
14
15
* [ 3.6.0] ( https://github.com/dtzar/helm-kubectl/releases/tag/3.6.0 ) - helm v3.6.0, kubectl v1.21.1, alpine 3.14
You can’t perform that action at this time.
0 commit comments