Skip to content

Commit

Permalink
Added deploy manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
kopsha committed Feb 24, 2024
1 parent 5ec6715 commit 123a258
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build and publish

on:
push:
branches:
- main

jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Log in to GitHub Container Registry
run: echo ${{ secrets.GHCR_PAT }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Build and push Docker image
run: |
docker build . -t ghcr.io/${{ github.repository }}/micro-invoicer:test-main
docker push ghcr.io/${{ github.repository }}/micro-invoicer:test-main
20 changes: 20 additions & 0 deletions deploy/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: micro-invoicer
spec:
replicas: 1
selector:
matchLabels:
app: micro-invoicer
template:
metadata:
labels:
app: micro-invoicer
spec:
containers:
- name: micro-container
image: ghcr.io/kopsha/micro-invoicer:test-main
ports:
- containerPort: 8000

13 changes: 13 additions & 0 deletions deploy/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: micro-invoicer
spec:
selector:
app: micro-invoicer
ports:
- protocol: TCP
port: 80
targetPort: 8000
type: LoadBalancer

0 comments on commit 123a258

Please sign in to comment.