Files
vpn-proxy/.gitea/workflows/gateway-build.yml
Dmitriy Petrov 3a930c9d8c
Some checks failed
Build and Deploy Gateway / build-and-deploy (push) Has been cancelled
Fix gateway workflow runner and deploy host
2026-05-09 10:58:19 +03:00

43 lines
1.3 KiB
YAML

name: Build and Deploy Gateway
on:
push:
branches: [master]
workflow_dispatch:
env:
DEPLOY_PATH: /opt/vpn-proxy
DEPLOY_HOST: 192.168.50.111
BASE_IMAGE: vpn-proxy-runtime-base:bookworm-slim
RUNTIME_BASE_SOURCE_IMAGE: mirror.gcr.io/library/debian:bookworm-slim
SINGBOX_VERSION: 1.12.13
jobs:
build-and-deploy:
runs-on: ubuntu-22.04
steps:
- name: Clone repository
env:
GIT_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
set -euo pipefail
SERVER_HOST=$(echo "${{ gitea.server_url }}" | sed 's|https\?://||')
rm -rf repo
git clone --depth 2 "http://${{ gitea.actor }}:${GIT_TOKEN}@${SERVER_HOST}/${{ gitea.repository }}.git" repo
cd repo
git checkout ${{ gitea.sha }}
- name: Build on runner 107 and deploy to 111
run: |
set -euo pipefail
cd repo
BUILD_HOST=local \
DEPLOY_HOST="${{ env.DEPLOY_HOST }}" \
DEPLOY_PATH="${{ env.DEPLOY_PATH }}" \
BASE_IMAGE="${{ env.BASE_IMAGE }}" \
RUNTIME_BASE_SOURCE_IMAGE="${{ env.RUNTIME_BASE_SOURCE_IMAGE }}" \
SINGBOX_VERSION="${{ env.SINGBOX_VERSION }}" \
IMAGE_TAG="${{ gitea.sha }}" \
bash scripts/build-on-107-deploy-111.sh