Skip to content

Commit

Permalink
fix image name
Browse files Browse the repository at this point in the history
  • Loading branch information
tushar5526 committed May 24, 2024
1 parent 5ea444e commit af01457
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ env:
APP_NAME: CMS-BACKEND-API
PROJECT_NAME: CMS-BACKEND-API
DOCKER_COMPOSE_PATH: /root/app/docker-compose.yml
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
DOCKER_REGISTRY: ghcr.io/code4govtech/dmp-cms-backend-api
DOT_ENV_FILE_NAME: env.data


Expand Down Expand Up @@ -91,17 +90,17 @@ jobs:

- name: Build ${{ env.APP_NAME }} Docker image
run: |
docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_LATEST }} .
docker build -t ${{ env.DOCKER_REGISTRY }}:${{ env.TAG_LATEST }} .
- name: Add tag to Docker image
run: |
echo ${{ github.sha }}
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_LATEST }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_ENV_COMMIT }}
docker tag ${{ env.DOCKER_REGISTRY }}:${{ env.TAG_LATEST }} ${{ env.DOCKER_REGISTRY }}:${{ env.TAG_ENV_COMMIT }}
- name: Push Docker image to GitHub Packages
run: |
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_LATEST }}
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_ENV_COMMIT }}
docker push ${{ env.DOCKER_REGISTRY }}:${{ env.TAG_LATEST }}
docker push ${{ env.DOCKER_REGISTRY }}:${{ env.TAG_ENV_COMMIT }}
deploy:
name: Deployment
Expand All @@ -116,7 +115,7 @@ jobs:
env:
DOCKER_COMPOSE_PATH: ${{ env.DOCKER_COMPOSE_PATH }}
APP_NAME: ${{ env.APP_NAME }}
DOCKER_REGISTRY: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
DOCKER_REGISTRY: ${{ env.DOCKER_REGISTRY }}
with:
host: ${{ vars.DEV_SERVER_HOST }}
username: ${{ vars.DEV_SERVER_USERNAME }}
Expand Down

0 comments on commit af01457

Please sign in to comment.