diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bb65038..1c599f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: echo VERSION=$VERSION docker tag $IMAGE_NAME $IMAGE_ID:$VERSION docker tag $IMAGE_NAME $IMAGE_ID:latest - docker push $IMAGE_ID:$VERSION + docker push $IMAGE_ID --all-tags deploy: needs: push runs-on: ubuntu-latest @@ -62,16 +62,12 @@ jobs: key: ${{ secrets.KEY }} port: ${{ secrets.PORT }} script: | - IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - echo $IMAGE_ID - echo IMAGE_ID=$IMAGE_ID docker stop munnar munnar1 docker rm munnar munnar1 - docker pull $IMAGE_ID:latest + docker pull docker.pkg.github.com/kites-foundation/hellomunnar-api:latest docker images - docker run -p 3600:3600 --name munnar --env-file /home/ubuntu/.env.list -d IMAGE_ID:latest - docker run -p 3601:3600 --name munnar1 --env-file /home/ubuntu/.env.list -d IMAGE_ID:latest + docker run -p 3600:3600 --name munnar --env-file /home/ubuntu/.env.list -d docker.pkg.github.com/kites-foundation/hellomunnar-api:latest + docker run -p 3601:3600 --name munnar1 --env-file /home/ubuntu/.env.list -d docker.pkg.github.com/kites-foundation/hellomunnar-api:latest docker ps echo "Latest Image Deployed" sudo systemctl restart nginx