Skip to content

Commit

Permalink
Adding auto-updater to charts repo
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrmr33 committed Mar 14, 2024
1 parent f8a66ab commit fed136b
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/auto-updater-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Auto Updater

on:
pull_request:
paths:
- auto-updater/**

jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Build Image
run: docker build -t auto-updater:${{ github.sha }} ./auto-updater

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'auto-updater:${{ github.sha }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'

- name: Login to GAR
uses: docker/login-action@v2
with:
registry: us-docker.pkg.dev
username: _json_key
password: "${{ secrets.GCP_SPOTIT_TODAY }}"
23 changes: 23 additions & 0 deletions auto-updater/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM alpine:3

ARG HELM_VERSION=v3.14.3

# ENV BASE_URL="https://storage.googleapis.com/kubernetes-helm"
ENV BASE_URL="https://get.helm.sh"

RUN case `uname -m` in \
x86_64) ARCH=amd64; ;; \
armv7l) ARCH=arm; ;; \
aarch64) ARCH=arm64; ;; \
ppc64le) ARCH=ppc64le; ;; \
s390x) ARCH=s390x; ;; \
*) echo "un-supported arch, exit ..."; exit 1; ;; \
esac && \
apk add --update --no-cache wget bash && \
wget -qL ${BASE_URL}/helm-${HELM_VERSION}-linux-${ARCH}.tar.gz -O- | tar -xz && \
mv linux-${ARCH}/helm /usr/bin/helm && \
chmod +x /usr/bin/helm && \
rm -rf linux-${ARCH} && \
apk del wget

WORKDIR /apps
1 change: 1 addition & 0 deletions auto-updater/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.0.1

0 comments on commit fed136b

Please sign in to comment.