I wonder if this works
All checks were successful
Build and push container image / build (push) Successful in 10m49s

This commit is contained in:
toast 2024-03-11 10:30:52 +11:00
parent 3da094eaa6
commit db99c1f3ca
2 changed files with 12 additions and 24 deletions

View File

@ -39,7 +39,15 @@ jobs:
cache-to: type=local,dest=/tmp/.buildx-cache-kon cache-to: type=local,dest=/tmp/.buildx-cache-kon
cache-from: type=local,src=/tmp/.buildx-cache,mode=max cache-from: type=local,src=/tmp/.buildx-cache,mode=max
- name: Rotate cache - name: Container deployment
run: | uses: https://github.com/appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3
rm -rf /tmp/.buildx-cache && \ with:
mv /tmp/.buildx-cache-kon /tmp/.buildx-cache host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
cd kon && docker compose pull && \
docker compose down bot --remove-orphans && docker compose up -d bot && \
docker image prune -f && docker system prune -f

View File

@ -1,20 +0,0 @@
name: Deploy to host
on:
registry_package:
types: [published]
jobs:
deploy:
runs-on: ubuntu-22.04-node
steps:
- name: SSH into Docker Host
uses: https://github.com/appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
cd kon && docker compose pull && \
docker compose down bot --remove-orphans && docker compose up -d bot && \
docker image prune -f && docker system prune -f