Skip to content

Update packages

Update packages #3

Workflow file for this run

name: Deploy
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Install GitVersion
uses: GitTools/actions/gitversion/[email protected]
with:
versionSpec: '5.5.0'
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Run GitVersion
id: gitversion
uses: GitTools/actions/gitversion/[email protected]
- name: Echo version
run: echo ${{ steps.gitversion.outputs.majorMinorPatch }}
- name: Build image and push
uses: docker/build-push-action@v2
with:
context: .
file: ./CaptchaBot/Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: |
${{ secrets.DOCKER_HUB_USERNAME }}/captchabot:latest
${{ secrets.DOCKER_HUB_USERNAME }}/captchabot:${{ steps.gitversion.outputs.majorMinorPatch }}
cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/captchabot:buildcache
cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/captchabot:buildcache,mode=max
- name: Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: ./update.captchabot.sh