This commit is contained in:
commit
dcaea6c600
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.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
10
Dockerfile
Normal 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"]
|
||||
Loading…
x
Reference in New Issue
Block a user