deploy stack after building gateway image
Was only building + pushing; swarm kept running the previous image until someone ran service update --force. Mirror the frontend workflow: ssh in and `docker stack deploy --resolve-image always` so every main push rolls out. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
37ad52bee6
commit
97b8103c37
1 file changed
+12
@@ -45,3 +45,15 @@ jobs:
|
||||
COMMIT_SHA=${{ github.sha }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
- name: docker stack deploy
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
username: root
|
||||
host: ${{ secrets.SSH_KNOWN_HOSTS }}
|
||||
key: ${{ secrets.SSH_PRIV_KEY }}
|
||||
script: |
|
||||
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
docker stack deploy -c ~/devops/hostinger/prod-stack.yaml prod --with-registry-auth --resolve-image always
|
||||
docker image prune -f --filter "until=24h"
|
||||
Reference in new issue
Block a user