Skip to content

Commit

Permalink
Merge pull request #1 from bharathk005/workflow
Browse files Browse the repository at this point in the history
updated workflow
  • Loading branch information
bharathk005 authored Oct 26, 2024
2 parents 6140077 + 3ea974c commit 45778bc
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cassata-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
run: docker build . --file Dockerfile --tag bharathk005/cassata:latest
- name: Push the Docker image
run: |
docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password ${{ secrets.DOCKERHUB_TOKEN }}
docker push my-image-name:$(date +%s)
docker push bharathk005/cassata:latest
18 changes: 18 additions & 0 deletions .github/workflows/cassata-init-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Cassata-Init-CI

on:
push:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build init --file Dockerfile --tag bharathk005/cassata-init:latest
- name: Push the Docker image
run: |
docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password ${{ secrets.DOCKERHUB_TOKEN }}
docker push bharathk005/cassata-init:latest
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Start of Selection
FROM golang:1.20-alpine as builder

WORKDIR /app

COPY . .

RUN CGO_ENABLED=0 GOOS=linux go build -o cassata ./cmd/server/main.go

FROM gcr.io/distroless/static

WORKDIR /app

COPY --from=builder /app/cassata .

CMD ["./cassata"]
15 changes: 15 additions & 0 deletions init/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM golang:1.20-alpine as builder

WORKDIR /app

COPY . .

RUN CGO_ENABLED=0 GOOS=linux go build -o cassata-init main.go

FROM gcr.io/distroless/static

WORKDIR /app

COPY --from=builder /app/cassata-init .

CMD ["./cassata-init"]
2 changes: 1 addition & 1 deletion manifest/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
value: {{ .Values.cassata.clusterRoleBinding.name }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.cassata.image.name }}:{{ .Values.cassata.image.tag | default .Chart.AppVersion }}"
image: "{{ .Values.cassata.image.name }}"
imagePullPolicy: {{ .Values.cassata.image.pullPolicy }}
env:
- name: JWT_SECRET_KEY
Expand Down
5 changes: 2 additions & 3 deletions manifest/helm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
cassata:
image:
name: cassata/cassata
name: bharathk005/cassata:latest
pullPolicy: IfNotPresent
tag: "latest"
replicaCount: 1
initContainer:
image: cassata/cassata-init:latest
image: bharathk005/cassata-init:latest

service:
type: ClusterIP
Expand Down

0 comments on commit 45778bc

Please sign in to comment.