initial commit
Some checks failed
Build and push k8s-workflow-image / build (push) Failing after 4s

This commit is contained in:
Chris Ellrich 2025-04-09 21:18:17 +02:00
commit dcaea6c600
Signed by: c.ellrich
GPG Key ID: D1850E1719D845AE
2 changed files with 32 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.GITEA_TOKEN }}" | docker login $REGISTRY -u ${{ GITEA.actor }} --password-stdin
docker build -t $REGISTRY/$IMAGE_NAME:latest .
docker push $REGISTRY/$IMAGE_NAME:latest

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM alpine:3.19
# Install kubectl and helm
RUN apk add --no-cache curl bash ca-certificates && \
curl -LO "https://dl.k8s.io/release/$(curl -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \
rm kubectl && \
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
ENTRYPOINT ["/bin/sh"]