Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
H1ghBre4k3r committed Nov 2, 2024
1 parent 50eb57b commit 5870f41
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Update Image Reference

on:
repository_dispatch:
types: kneipolympics-deploy-trigger

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out The Repository
uses: actions/checkout@v2
- name: Set lower case owner name
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: "${{ github.repository_owner }}"
- name: Update Version In Checked-Out Code
if: ${{ github.event.client_payload.sha }}
run: |
sed -i "s@\(.*image:\).*@\1 ghcr.io/${{ env.OWNER_LC }}/kneipolympics:${{ github.event.client_payload.sha }}@" ${GITHUB_WORKSPACE}/manifests/deployment.yml
- name: Commit The New Image Reference
uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ github.event.client_payload.sha }}
with:
commit_message: Deploy new image ${{ github.event.client_payload.sha }}
branch: main
commit_options: "--no-verify --signoff"
repository: .
commit_user_name: PescaDev GitOps Bot
commit_user_email: [email protected]
commit_author: PescaDev GitOps <[email protected]>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
secret.*
27 changes: 27 additions & 0 deletions manifests/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.kompose.service: kneipolympics-deployment
name: kneipolympics-deployment
namespace: kneipolympics
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: kneipolympics-deployment
strategy: {}
template:
metadata:
labels:
io.kompose.service: kneipolympics-deployment
spec:
containers:
- image: ghcr.io/pesca-dev/kneipolympics:604d50ef30699d8ab507049aeb51d5bc074153e7
imagePullPolicy: Always
name: aoc-website-deployment
ports:
- containerPort: 80
resources: {}
restartPolicy: Always
status: {}
16 changes: 16 additions & 0 deletions manifests/ingress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: kneipolympics-ingress
namespace: kneipolympics
spec:
entryPoints:
- websecure
routes:
- match: Host(`bar.inf-cau.de`)
kind: Rule
services:
- name: kneipolympics-service
port: 80
tls:
certResolver: le
16 changes: 16 additions & 0 deletions manifests/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: kneipolympics-service
name: kneipolympics-service
namespace: kneipolympics
spec:
ports:
- protocol: TCP
name: web
port: 3000
selector:
io.kompose.service: kneipolympics-deployment
status:
loadBalancer: {}

0 comments on commit 5870f41

Please sign in to comment.