Repository navigation
66 lines (58 loc) · 1.98 KB
/
Copy pathdeploy-tier2.yml
File metadata and controls
66 lines (58 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# GitHub Actions - Build & Deploy the unified Python tool runner
#
# Since ALL Python tools run in ONE container, we just rebuild
# and redeploy that single container when any tool changes.
#
# ⚠️ DISABLED: Auto-deploy is disabled until production infra is ready.
# To deploy manually, use the "Run workflow" button in GitHub Actions.
name: Deploy - Python Tool Runner
on:
# DISABLED: Remove the comments below to enable auto-deploy on push
# push:
# branches: [main]
# paths:
# - "services/python-tools/**"
workflow_dispatch: # Manual trigger only (for now)
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/oxtools-python-tools
jobs:
build-and-push:
name: Build Docker Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: services/python-tools
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
# Uncomment when Azure VM / deployment target is ready
# deploy:
# name: Deploy to Server
# needs: build-and-push
# runs-on: ubuntu-latest
# steps:
# - name: Deploy via SSH
# uses: appleboy/ssh-action@v1
# with:
# host: ${{ secrets.DEPLOY_HOST }}
# username: ${{ secrets.DEPLOY_USER }}
# key: ${{ secrets.DEPLOY_SSH_KEY }}
# script: |
# docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
# cd /opt/oxtools
# docker compose up -d --no-deps python-tools
# echo "✅ Python tool runner deployed"