Erki b28f50368f
All checks were successful
Build and push latest / publish (push) Successful in 53s
Do the docker do
2024-10-02 09:15:33 +03:00

44 lines
1.1 KiB
YAML

name: Build and push latest
run-name: Build and push latest
on: [push]
jobs:
publish:
runs-on: ubuntu-latest
if: gitea.ref == 'refs/heads/master'
steps:
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to registry
uses: docker/login-action@v3
with:
registry: git.skullnet.me
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- uses: actions/checkout@v4
with:
lfs: 'true'
submodules: 'recursive'
- run: git lfs pull
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: "git.skullnet.me/erki/embeddingcpp:latest"
file: Dockerfile
- name: Update compose hosting
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
script: |
cd ~/randos
docker compose pull
docker compose up -d