re-run server #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pull docker image, re-run container | |
on: | |
workflow_run: | |
workflows: | |
- "generate docker image, upload to docker hub" | |
types: | |
- completed | |
jobs: | |
rerun-server: | |
runs-on: ubuntu-latest | |
steps: | |
- name: pull image and rerun w/ ssh command | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
script: | | |
docker pull gmlwh124/ajaja:latest | |
docker ps -aq | xargs docker stop | xargs docker rm | |
docker run -d -p 8080:8080 gmlwh124/ajaja:latest |