Skip to content

Commit

Permalink
New Deployment File
Browse files Browse the repository at this point in the history
  • Loading branch information
jishk11 committed Jan 24, 2025
1 parent 3c15991 commit 42e5ff7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Empty file.
37 changes: 37 additions & 0 deletions .github/workflows/new_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy

on:
push:
branches: [master]
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
# Check out the repository
- name: Check out code
uses: actions/checkout@v3

# Set up Docker
- name: Set up Docker
uses: docker/setup-buildx-action@v3

# Log in to DigitalOcean Container Registry
- name: Log in to DigitalOcean
run: echo "${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}" | docker login -u "doctl" --password-stdin registry.digitalocean.com

# Build and push Docker image
- name: Build and push Docker image
run: |
docker buildx build --platform linux/amd64,linux/arm64 \
--tag registry.digitalocean.com/dailybruin/dbonline:latest \
--push .
# Update Kubernetes deployment
- name: Update Kubernetes deployment
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
run: |
kubectl set image deployment/<flamingo> <container-name>=registry.digitalocean.com/dailybruin/dbonline:latest
kubectl rollout status deployment/<flamingo>

0 comments on commit 42e5ff7

Please sign in to comment.