initial commit
All checks were successful
Build and push k8s-workflow-image / build (push) Successful in 5s

change token

fixed Dockerfile

fixed again

again

should work now
This commit is contained in:
Chris Ellrich 2025-04-09 21:18:17 +02:00
commit d532217b84
Signed by: c.ellrich
GPG Key ID: D1850E1719D845AE
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,22 @@
name: Build and push k8s-workflow-image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build and push Docker image
env:
REGISTRY: git.ellri.ch
IMAGE_NAME: ${{ GITEA.repository_owner }}/k8s-workflow
run: |
echo "${{ secrets.GITEATOKEN }}" | docker login $REGISTRY -u ${{ GITEA.actor }} --password-stdin
docker build -t $REGISTRY/$IMAGE_NAME:latest .
docker push $REGISTRY/$IMAGE_NAME:latest

24
Dockerfile Normal file
View File

@ -0,0 +1,24 @@
FROM alpine
ARG HELM_VERSION=3.2.1
ARG KUBECTL_VERSION=1.17.5
# Determine architecture
RUN case `uname -m` in \
x86_64) ARCH=amd64 ;; \
armv7l) ARCH=arm ;; \
aarch64) ARCH=arm64 ;; \
ppc64le) ARCH=ppc64le ;; \
s390x) ARCH=s390x ;; \
*) echo "Unsupported arch" && exit 1 ;; \
esac && echo "ARCH=$ARCH" > /envfile
# Install Helm and kubectl
RUN . /envfile && \
apk add --no-cache curl ca-certificates bash && \
curl -sL https://get.helm.sh/helm-v${HELM_VERSION}-linux-${ARCH}.tar.gz | tar -xz && \
mv linux-${ARCH}/helm /usr/bin/helm && chmod +x /usr/bin/helm && rm -rf linux-${ARCH} && \
curl -sLO https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl && \
mv kubectl /usr/bin/kubectl && chmod +x /usr/bin/kubectl
WORKDIR /apps