Skip to content

Commit

Permalink
fix: CD
Browse files Browse the repository at this point in the history
  • Loading branch information
mmtftr committed Oct 15, 2024
1 parent c4d5537 commit a98f57e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/prod_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
token: ${{ secrets.DO_ACCESS_TOKEN }}

# Build a Docker image of your application in your registry and tag the image with the $GITHUB_SHA.
# Build a Docker image of the application and tag the image with the $GITHUB_SHA.
- name: Build backend image
run: docker build -t registry.digitalocean.com/programming-languages/backend:$(echo $GITHUB_SHA | head -c7) ./backend

Expand All @@ -28,15 +28,23 @@ jobs:
- name: Log in to DigitalOcean Container Registry with short-lived credentials
run: doctl registry login --expiry-seconds 1200

# Push the Docker image to your registry.
# Push the Docker image to registry

- name: Push backend image
run: docker push registry.digitalocean.com/programming-languages/backend:$(echo $GITHUB_SHA | head -c7)

- name: Push web image
run: docker push registry.digitalocean.com/programming-languages/web:$(echo $GITHUB_SHA | head -c7)

# TODO: push to latest
# tag as latest

- name: Tag backend image
run: docker tag registry.digitalocean.com/programming-languages/backend:$(echo $GITHUB_SHA | head -c7) registry.digitalocean.com/programming-languages/backend:latest

- name: Tag web image
run: docker tag registry.digitalocean.com/programming-languages/web:$(echo $GITHUB_SHA | head -c7) registry.digitalocean.com/programming-languages/web:latest

# Push the Docker image to registry

- name: Push backend image
run: docker push registry.digitalocean.com/programming-languages/backend:latest
Expand Down

0 comments on commit a98f57e

Please sign in to comment.