Compare commits

..

14 Commits

Author SHA1 Message Date
Evrard Van Espen
dd1b3accb4 DONE
All checks were successful
Build and deploy / Build (push) Successful in 2m19s
2025-11-20 20:24:33 +00:00
Evrard Van Espen
7968ceed33 DONE
All checks were successful
Build and deploy / Build (push) Successful in 2m20s
2025-11-20 20:20:44 +00:00
Evrard Van Espen
54ffd24610 DONE
All checks were successful
Build and deploy / Build (push) Successful in 1m52s
2025-11-20 20:08:45 +00:00
Evrard Van Espen
ad55d7018d DONE
Some checks failed
Build and deploy / Build (push) Failing after 2m12s
2025-11-20 20:06:28 +00:00
Evrard Van Espen
c696efbac3 DONE
All checks were successful
Build and deploy / Build (push) Successful in 2m7s
2025-11-20 19:56:09 +00:00
Evrard Van Espen
e2eeafacc8 Testing
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2m13s
2025-11-20 19:50:39 +00:00
Evrard Van Espen
604633fe7f Testing
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2m6s
2025-11-20 19:40:15 +00:00
Evrard Van Espen
00da78dd87 Testing
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m50s
2025-11-20 19:34:46 +00:00
Evrard Van Espen
bea4784dc6 Testing
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2m6s
2025-11-20 19:30:46 +00:00
Evrard Van Espen
ce09964bc1 Testing
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2m5s
2025-11-20 19:11:04 +00:00
Evrard Van Espen
374909497a Testing
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2m7s
2025-11-20 19:03:43 +00:00
Evrard Van Espen
1e1f25f3ff Testing
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 32s
2025-11-20 18:57:39 +00:00
Evrard Van Espen
d05ba9903c Testing
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 27s
2025-11-20 18:56:52 +00:00
Evrard Van Espen
4f49fcfa48 Testing
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 27s
2025-11-20 18:56:03 +00:00
5 changed files with 116 additions and 54 deletions

View File

@@ -1,36 +1,36 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
name: Build and deploy
run-name: 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
Build:
runs-on: ubuntu-latest
steps:
# - name: Login to container registry
# uses: https://github.com/docker/login-action@v3
# with:
# registry: https://git.vanespen.dev
# username: ${{ secrets.USERNAME }}
# password: ${{ secrets.PASSWORD }}
- name: Login to container registry
uses: https://github.com/docker/login-action@v3
with:
registry: https://git.vanespen.dev
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Check out repository code
uses: actions/checkout@v4
# - name: Set up Docker Buildx
# uses: https://github.com/docker/setup-buildx-action@v3
# - name: Build and push
# uses: https://github.com/docker/build-push-action@v6
# with:
# context: .
# push: true
# pull: true
# no-cache: true
# tags: "git.vanespen.dev/evanespen/blog:latest"
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Build and push
uses: https://github.com/docker/build-push-action@v6
with:
context: .
push: true
pull: true
no-cache: true
tags: "git.vanespen.dev/evanespen/blog:latest"
- name: Setup Kubectl
run: |
mkdir ~/.kube
export KUBECONFIG=${{ secrets.KUBECONFIG }}
env
echo "$KUBECONFIG" > ~/.kube/config
cat ~/.kube/config
# curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
# install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
# /usr/local/bin/kubectl apply --validate=false -f argo.yaml
echo '${{ secrets.KUBECONFIG }}' > ~/.kube/config
export COMMIT_REF=$(git rev-parse HEAD)
echo $COMMIT_REF
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
sed -i "s/COMMIT_REF/$COMMIT_REF/g" argo.template.yaml
/usr/local/bin/kubectl apply --validate=false -f argo.template.yaml

43
argo.template.yaml Normal file
View File

@@ -0,0 +1,43 @@
---
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: blog
namespace: argocd
spec:
description: Project for the blog application
sourceRepos:
- https://git.vanespen.dev/evanespen/blog
destinations:
- namespace: blog
server: https://kubernetes.default.svc
clusterResourceWhitelist:
- group: "*"
kind: "*"
namespaceResourceWhitelist:
- group: "*"
kind: "*"
syncWindows: []
roles: []
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: blog-argo
namespace: argocd
spec:
project: blog
source:
repoURL: "https://git.vanespen.dev/evanespen/blog"
targetRevision: COMMIT_REF
path: "k8s"
destination:
server: "https://kubernetes.default.svc"
namespace: blog
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true

View File

@@ -1,18 +0,0 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: blog-argo
namespace: argocd
spec:
project: default
source:
repoURL: "https://git.vanespen.dev/evanespen/blog"
path: "k8s"
targetRevision: developer
destination:
server: "https://kubernetes.default.svc"
namespace: argocd
syncPolicy:
automated:
prune: true
selfHeal: true

47
k8s/deploy.yaml Normal file
View File

@@ -0,0 +1,47 @@
---
apiVersion: v1
kind: Pod
metadata:
name: blog-pod
namespace: blog
labels:
app: blog-pod
spec:
containers:
- name: blog-container
image: git.vanespen.dev/evanespen/blog:latest
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: blog-service
namespace: blog
spec:
selector:
app: blog-pod
ports:
- protocol: TCP
port: 80
targetPort: 80
type: ClusterIP
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: blog-ingressroute
namespace: blog
spec:
entryPoints:
- websecure
routes:
- match: Host(`vanespen.dev`)
kind: Rule
services:
- name: blog-service
port: 80
tls:
certResolver: letsencrypt_dns

View File

@@ -1,10 +0,0 @@
apiVersion: v1
kind: Pod
metadata:
name: blog-pod
spec:
containers:
- name: blog-container
image: git.vanespen.dev/evanespen/blog:latest
ports:
- containerPort: 80