commit dcaea6c600cf18d60640b4b303c28d358b91881f Author: Christoph Ellrich Date: Wed Apr 9 21:18:17 2025 +0200 initial commit diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..1a825ce --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -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 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7594d24 --- /dev/null +++ b/Dockerfile @@ -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"]