Skip to content

Release & deploy server container (tag) #13

Release & deploy server container (tag)

Release & deploy server container (tag) #13

name: Release & deploy server container (tag)
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-22.04
name: Build container
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Build container
uses: ./.github/actions/docker-build-push
with:
token: ${{ secrets.GITHUB_TOKEN }}
container: server
tag: ${{ github.ref_name }}
no-cache: true
build-args: |
TOMATO_VERSION=${{ github.ref_name }}
deploy:
runs-on: ubuntu-22.04
name: Deploy
needs: [build]
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Deploy containers
uses: appleboy/ssh-action@master
env:
TOMATO_TAG: ${{ github.ref_name }}
with:
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
fingerprint: ${{ secrets.SSH_FINGERPRINT }}
envs: TOMATO_TAG
script: ${{ secrets.DEPLOY_PROD_SCRIPT_PATH }}