Skip to content

Merge pull request #46 from xconnio/update-yamux #23

Merge pull request #46 from xconnio/update-yamux

Merge pull request #46 from xconnio/update-yamux #23

Workflow file for this run

name: build docker image & push to docker hub
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Build Docker image
run: make build-docker
- name: Log in and push Docker image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
VERSION=$(git describe --tags --always)
docker tag xconnio/deskconn-router:latest xconnio/deskconn-router:$VERSION
docker push xconnio/deskconn-router:latest
docker push xconnio/deskconn-router:$VERSION
deploy:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Deploy to VPS
uses: appleboy/ssh-action@v1.2.5
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }}
key: ${{ secrets.VPS_SSH_KEY }}
script: |
docker pull xconnio/deskconn-router:latest
sudo systemctl restart deskconn-router.service