48 lines
1.6 KiB
YAML
48 lines
1.6 KiB
YAML
name: Build and Deploy Chitfund
|
|
on: [push]
|
|
|
|
jobs:
|
|
build-backend:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
DOCKER_HOST: tcp://172.17.0.1:2375
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Build and push Backend (Kaniko)
|
|
run: |
|
|
# Find this job container by its known name pattern
|
|
JOB_CONTAINER=$(docker ps --format '{{.Names}}' | grep 'GITEA-ACTIONS-TASK' | head -1)
|
|
echo "Using volumes from: $JOB_CONTAINER"
|
|
|
|
docker run --rm \
|
|
--volumes-from "$JOB_CONTAINER" \
|
|
gcr.io/kaniko-project/executor:latest \
|
|
--context=dir:///workspace/deepkoluguri/chitfund/backend \
|
|
--dockerfile=Dockerfile \
|
|
--destination=192.168.8.250:5000/chitfund-backend:latest \
|
|
--insecure \
|
|
--skip-tls-verify
|
|
|
|
build-frontend:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
DOCKER_HOST: tcp://172.17.0.1:2375
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Build and push Frontend (Kaniko)
|
|
run: |
|
|
JOB_CONTAINER=$(docker ps --format '{{.Names}}' | grep 'GITEA-ACTIONS-TASK' | head -1)
|
|
echo "Using volumes from: $JOB_CONTAINER"
|
|
|
|
docker run --rm \
|
|
--volumes-from "$JOB_CONTAINER" \
|
|
gcr.io/kaniko-project/executor:latest \
|
|
--context=dir:///workspace/deepkoluguri/chitfund/luckychit \
|
|
--dockerfile=Dockerfile \
|
|
--destination=192.168.8.250:5000/chitfund-frontend:latest \
|
|
--insecure \
|
|
--skip-tls-verify |