Tag latest always
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 3m54s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 3m54s
This commit is contained in:
@@ -26,17 +26,18 @@ jobs:
|
||||
run: docker build -t fichajes .
|
||||
|
||||
- name: Tag Docker image
|
||||
run: docker tag fichajes ${{ secrets.DOCKER_REGISTRY }}/hacecalor/fichajes:${{ github.run_number }}
|
||||
run: docker tag fichajes ${{ secrets.DOCKER_REGISTRY }}/hacecalor/fichajes:latest
|
||||
|
||||
- name: Push Docker image to registry
|
||||
run: docker push ${{ secrets.DOCKER_REGISTRY }}/hacecalor/fichajes:${{ github.run_number }}
|
||||
run: docker push ${{ secrets.DOCKER_REGISTRY }}/hacecalor/fichajes:latest
|
||||
|
||||
- name: Connect to remote host and deploy
|
||||
uses: appleboy/ssh-action@v1
|
||||
with:
|
||||
host: ${{ secrets.REMOTE_HOST }}
|
||||
username: ${{ secrets.REMOTE_USER }}
|
||||
password: ${{ secrets.REMOTE_PASSWORD }}
|
||||
script: |
|
||||
docker pull
|
||||
docker-compose up -d
|
||||
# - name: Connect to remote host and deploy
|
||||
# uses: appleboy/ssh-action@v1
|
||||
# with:
|
||||
# host: ${{ secrets.REMOTE_HOST }}
|
||||
# username: ${{ secrets.REMOTE_USER }}
|
||||
# password: ${{ secrets.REMOTE_PASSWORD }}
|
||||
# script: |
|
||||
# cd /docker/fichajes
|
||||
# docker pull hacecalor/fichajes:latest
|
||||
# docker-compose up -d
|
||||
|
||||
Reference in New Issue
Block a user