Skip to content

ci: Invoke docker compose pull on rena.ffh.zone #10

ci: Invoke docker compose pull on rena.ffh.zone

ci: Invoke docker compose pull on rena.ffh.zone #10

name: Build and publish Docker image
on:
push:
branches: [ "main" ]
jobs:
build:
name: Build Docker image and push to container repository
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: freifunkh/fnorden-membership-signup:latest
- name: pull the latest docker image
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY_GITHUB_ACTIONS_AUTO }}
port: ${{ secrets.SSH_PORT }}
script: |
cd /opt/fnordensignup/
/usr/bin/docker compose pull
/usr/bin/docker compose up -d