initial commit
All checks were successful
Build and push k8s-workflow-image / build (push) Successful in 5s
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:
commit
d532217b84
22
.gitea/workflows/deploy.yaml
Normal file
22
.gitea/workflows/deploy.yaml
Normal 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
24
Dockerfile
Normal 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
|
||||||
Loading…
x
Reference in New Issue
Block a user