agentic-os/.gitea/workflows/whatsapp-gateway-build.yaml

41 lines
1.2 KiB
YAML

name: Build Whatsapp Gateway
on:
push:
branches:
- main
paths:
- 'whatsapp-gateway/**'
jobs:
build-whatsapp-gateway:
runs-on: ubuntu-latest
env:
DOCKER_HOST: tcp://172.17.0.1:2375
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build and push Whatsapp Gateway (Kaniko)
run: |
# Use short SHA for reproducible, auditable image tags.
SHORT_SHA="${GITHUB_SHA::7}"
IMAGE_TAG="192.168.8.250:5000/agentic-os/whatsapp-gateway:${SHORT_SHA}"
IMAGE_LATEST="192.168.8.250:5000/agentic-os/whatsapp-gateway:latest"
JOB_CONTAINER=$(docker ps --format '{{.Names}}' | grep 'GITEA-ACTIONS-TASK' | head -1)
echo "Using volumes from: $JOB_CONTAINER"
echo "Building image: $IMAGE_TAG"
docker run --rm \
--volumes-from "$JOB_CONTAINER" \
gcr.io/kaniko-project/executor:latest \
--context=dir:///workspace/deepkoluguri/agentic-os/whatsapp-gateway \
--dockerfile=Dockerfile \
--destination="${IMAGE_TAG}" \
--destination="${IMAGE_LATEST}" \
--insecure \
--skip-tls-verify
echo "Built and pushed: ${IMAGE_TAG}"