Skip to content

Commit

Permalink
update deploy ga
Browse files Browse the repository at this point in the history
  • Loading branch information
Fajar-Islami committed Oct 17, 2024
1 parent 3f2c0ea commit f6aa42d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ jobs:
echo "${{ vars.ENV }}" > .env
docker login ${{env.REGISTRY}} -u ${{github.actor}} -p ${{secrets.GITHUB_TOKEN}}
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
docker rm -f ${{ env.CONTAINER_NAME }}
docker run --add-host=host.docker.internal:host-gateway --name ${{ env.CONTAINER_NAME }}_${{ github.sha }} -v ./.env:/.env -d --restart=on-failure:5 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
echo ${{ env.CONTAINER_NAME }}
docker rm -f ${{ env.CONTAINER_NAME }} || true
docker run --add-host=host.docker.internal:host-gateway --name ${{ env.CONTAINER_NAME }} -v ./.env:/.env -d --restart=on-failure:5 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
docker images --format "{{.Repository}}:{{.Tag}}" | grep "^${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}" | grep -v ":${{ github.sha }}" | xargs -r docker rmi
# NO DOWNTIME TPI MASIH BUG, gk keapus container
Expand Down

0 comments on commit f6aa42d

Please sign in to comment.