-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v0.0.1 |