Skip to content

Commit

Permalink
chore: Update auto deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
quangkeu95 committed Sep 7, 2024
1 parent beb293b commit 9e63a3b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
GCLOUD_IMAGE_NAME: "whale-notification-tg-bot"
DOCKER_FILE_PATH: "./Dockerfile"

name: docker-build
name: docker-build-and-push
jobs:
required:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -79,6 +79,14 @@ jobs:
file: ${{ env.DOCKER_FILE_PATH }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
# Update deployment
- uses: "azure/setup-kubectl@v4"
id: kubectl-installer
- name: Update deployments
# Assume we only deploy latest version
run: |
echo "Deploying whale-notification-bot to production with image ${{ env.GCLOUD_ZONE }}-docker.pkg.dev/${{ secrets.GCLOUD_PROJECT_ID }}/${{ env.GCLOUD_ARTIFACT_REGISTRY }}/${{ env.GCLOUD_IMAGE_NAME }}:${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_commit_id.outputs.sha_short }}"
kubectl -n whale-notification-tg-bot set image deployment/whale-notification-tg-bot whale-notification-tg-bot=${{ env.GCLOUD_ZONE }}-docker.pkg.dev/${{ secrets.GCLOUD_PROJECT_ID }}/${{ env.GCLOUD_ARTIFACT_REGISTRY }}/${{ env.GCLOUD_IMAGE_NAME }}:${{ steps.extract_branch.outputs.branch }}-${{ steps.extract_commit_id.outputs.sha_short }}
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
Expand Down

0 comments on commit 9e63a3b

Please sign in to comment.