66 lines
1.9 KiB
YAML
66 lines
1.9 KiB
YAML
name: Deploy IFT (core)
|
|
|
|
on:
|
|
push:
|
|
branches: [master, main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy-ift-core:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Login to registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: git.sabilin.com
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Build and push eventhub
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
file: docker/Dockerfile
|
|
push: true
|
|
tags: git.sabilin.com/eventhub/eventhub:ift
|
|
|
|
- name: Build and push traefik-coraza
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: docker/traefik
|
|
file: docker/traefik/Dockerfile
|
|
push: true
|
|
tags: git.sabilin.com/eventhub/traefik-coraza:ift
|
|
|
|
- name: Build and push fallback
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: docker/fallback
|
|
file: docker/fallback/Dockerfile
|
|
push: true
|
|
tags: git.sabilin.com/eventhub/fallback:ift
|
|
|
|
- name: Build and push bot-emulator
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
file: test/emulate_users/Dockerfile
|
|
push: true
|
|
tags: git.sabilin.com/eventhub/bot-emulator-users:ift
|
|
|
|
- name: Deploy core on IFT via SSH
|
|
uses: appleboy/ssh-action@v0.1.5
|
|
with:
|
|
host: ${{ secrets.IFT_SSH_HOST }}
|
|
username: ${{ secrets.IFT_SSH_USER }}
|
|
key: ${{ secrets.IFT_SSH_PRIVATE_KEY }}
|
|
script: |
|
|
export REGISTRY_USER='${{ secrets.REGISTRY_USER }}'
|
|
export REGISTRY_PASSWORD='${{ secrets.REGISTRY_PASSWORD }}'
|
|
/opt/eventhub-ift/devops/scripts/deploy-service.sh ift core
|