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 16, 2024
1 parent 6dcb116 commit ea22d4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ jobs:
docker login ${{env.REGISTRY}} -u ${{github.actor}} -p ${{secrets.GITHUB_TOKEN}}
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
echo ${{ vars.ENV }} | base64 -d > .env
docker ps -a --filter "ancestor=${{ env.IMAGE_NAME }}" --format "{{.ID}}" | xargs docker rm
docker run --add-host=host.docker.internal:host-gateway --name ${{ env.IMAGE_NAME }}_${{ github.sha }} -v ./.env:/app/.env -d --restart=on-failure:5 --network fajar_discord_bot ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
docker ps -a --filter "ancestor=${{ env.IMAGE_NAME }}" --format "{{.ID}}" | xargs -r docker rm
docker run --add-host=host.docker.internal:host-gateway --name ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}_${{ github.sha }} -v ./.env:/app/.env -d --restart=on-failure:5 --network fajar_discord_bot ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
rm .env
docker images --format "{{.Repository}}:{{.Tag}}" | grep "^${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}" | grep -v ":${{ github.sha }}" | xargs -r docker rmi
# docker login ${{env.REGISTRY}} -u ${{github.actor}} -p ${{secrets.GITHUB_TOKEN}}
# docker info
Expand Down

0 comments on commit ea22d4f

Please sign in to comment.