Skip to content

Commit

Permalink
Revert "boda sheer part 2"
Browse files Browse the repository at this point in the history
This reverts commit d6cdd5a.
  • Loading branch information
Aman-poojary committed Jul 23, 2024
1 parent d6cdd5a commit 7bfb9aa
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
34 changes: 33 additions & 1 deletion .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,40 @@ on:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.22

- name: Install dependencies
run: go mod tidy
working-directory: ./src

- name: Build
run: go build -o app
working-directory: ./src

- name: Run tests
run: go test ./...
working-directory: ./src

- name: Build Docker image
run: docker build -t amanpoojary/cicd2:latest .

- name: Push Docker image
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
docker push amanpoojary/cicd2:latest
deploy:
# needs: build
needs: build
runs-on: self-hosted

steps:
Expand Down
4 changes: 2 additions & 2 deletions kubernetes/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ spec:
spec:
containers:
- name: go-app
image: amanpoojary/node-app:latest
image: amanpoojary/cicd:latest
ports:
- containerPort: 3000
- containerPort: 8080
2 changes: 1 addition & 1 deletion kubernetes/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ spec:
ports:
- protocol: TCP
port: 80
targetPort: 3000
targetPort: 8080
nodePort: 30080
type: NodePort

0 comments on commit 7bfb9aa

Please sign in to comment.