Changed :latest to :main
This commit is contained in:
parent
7c0abeeafd
commit
525dcb502b
@ -64,12 +64,12 @@ jobs:
|
|||||||
- name: Login to registry
|
- name: Login to registry
|
||||||
run: ssh ${{ vars.TARGET_USER }}@${{ vars.TARGET }} -o StrictHostKeyChecking=no "docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} ${{ vars.REGISTRY }}"
|
run: ssh ${{ vars.TARGET_USER }}@${{ vars.TARGET }} -o StrictHostKeyChecking=no "docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} ${{ vars.REGISTRY }}"
|
||||||
- name: Pull new image
|
- name: Pull new image
|
||||||
run: ssh ${{ vars.TARGET_USER }}@${{ vars.TARGET }} -o StrictHostKeyChecking=no "docker pull ${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
|
run: ssh ${{ vars.TARGET_USER }}@${{ vars.TARGET }} -o StrictHostKeyChecking=no "docker pull ${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}:main"
|
||||||
- name: Logout from registry
|
- name: Logout from registry
|
||||||
run: ssh ${{ vars.TARGET_USER }}@${{ vars.TARGET }} -o StrictHostKeyChecking=no "docker logout ${{ vars.REGISTRY }}"
|
run: ssh ${{ vars.TARGET_USER }}@${{ vars.TARGET }} -o StrictHostKeyChecking=no "docker logout ${{ vars.REGISTRY }}"
|
||||||
- name: Stop and Remove the container
|
- name: Stop and Remove the container
|
||||||
run: ssh ${{ vars.TARGET_USER }}@${{ vars.TARGET }} -o StrictHostKeyChecking=no "docker stop ${{ env.IMAGE_NAME }} && docker remove ${{ env.IMAGE_NAME }}"
|
run: ssh ${{ vars.TARGET_USER }}@${{ vars.TARGET }} -o StrictHostKeyChecking=no "docker stop ${{ env.IMAGE_NAME }} && docker remove ${{ env.IMAGE_NAME }}"
|
||||||
- name: Recreate the container
|
- name: Recreate the container
|
||||||
run: ssh ${{ vars.TARGET_USER }}@${{ vars.TARGET }} -o StrictHostKeyChecking=no "docker run --name=${{ env.IMAGE_NAME }} ${{ env.IMAGE_NAME }}:latest"
|
run: ssh ${{ vars.TARGET_USER }}@${{ vars.TARGET }} -o StrictHostKeyChecking=no "docker run --name=${{ env.IMAGE_NAME }} ${{ env.IMAGE_NAME }}:main"
|
||||||
- name: Clean old images
|
- name: Clean old images
|
||||||
run: ssh ${{ vars.TARGET_USER }}@${{ vars.TARGET }} -o StrictHostKeyChecking=no "docker image prune -a"
|
run: ssh ${{ vars.TARGET_USER }}@${{ vars.TARGET }} -o StrictHostKeyChecking=no "docker image prune -a"
|
||||||
|
Loading…
Reference in New Issue
Block a user