Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

chore(deps): update golang docker tag to v1.20.6 #5

chore(deps): update golang docker tag to v1.20.6

chore(deps): update golang docker tag to v1.20.6 #5

Workflow file for this run

name: Continuous Delivery
on:
push:
branches:
- main
workflow_dispatch:
jobs:
push-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
930c/expense-management-images:${{ github.sha }}
930c/expense-management-images:latest
start-service:
runs-on: ubuntu-latest
needs: push-docker
steps:
- name: Execute remote ssh commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
port: ${{ secrets.SERVER_PORT }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
docker-compose pull
docker-compose stop
docker-compose rm -f
docker-compose up -d