Skip to content

Commit cbb76c0

Browse files
authored
Switch to GitHub Actions, add helm 3.7.0 (#94)
1 parent c9f43f4 commit cbb76c0

File tree

5 files changed

+56
-71
lines changed

5 files changed

+56
-71
lines changed

Diff for: .github/workflows/image-build-push.yaml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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 }}

Diff for: .travis.yml

-53
This file was deleted.

Diff for: Dockerfile

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
FROM alpine:3
22

3-
ARG VCS_REF
4-
ARG BUILD_DATE
53
ARG KUBE_VERSION
64
ARG HELM_VERSION
75

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-
156
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 \
178
&& 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 \
1910
&& chmod +x /usr/local/bin/helm \
2011
&& chmod g+rwx /root \
2112
&& mkdir /config \

Diff for: Makefile

+3-7
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,17 @@ default: docker_build
22

33
DOCKER_IMAGE ?= dtzar/helm-kubectl
44
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"`
75

86
# Note: Latest version of kubectl may be found at:
97
# https://github.com/kubernetes/kubernetes/releases
10-
KUBE_VERSION = "1.21.2"
8+
KUBE_VERSION = "1.22.2"
119

1210
# Note: Latest version of helm may be found at
1311
# https://github.com/kubernetes/helm/releases
14-
HELM_VERSION = "3.6.3"
12+
HELM_VERSION = "3.7.0"
1513

1614
docker_build:
17-
@docker build \
18-
--build-arg VCS_REF=$(VCS_REF) \
19-
--build-arg BUILD_DATE=$(BUILD_DATE) \
15+
@docker buildx build \
2016
--build-arg KUBE_VERSION=$(KUBE_VERSION) \
2117
--build-arg HELM_VERSION=$(HELM_VERSION) \
2218
-t $(DOCKER_IMAGE):$(DOCKER_TAG) .

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
Supported tags and release links
1111

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
1213
* [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
1314
* [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
1415
* [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

0 commit comments

Comments
 (0)