Skip to content

Pull latest Docker image and start container #15

Pull latest Docker image and start container

Pull latest Docker image and start container #15

Workflow file for this run

name: Pull latest Docker image and start container
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
workflow_run:
workflows: ['Create and publish a Docker image']
types: [completed]
branches:
- 'main'
jobs:
deploy-compose:
name: Deploy compose
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: copy file via ssh password
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.PORT }}
source: "deploy/app/docker-compose.yml"
target: /var/data/services/test-gallowhead/
start-container:
name: Start container
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using ssh key
uses: appleboy/[email protected]
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.PORT }}
script: cd /var/data/services/test-gallowhead && docker compose up --build -d