ci: use --volumes-from to share job container workspace with kaniko
Build and Deploy Chitfund / build-backend (push) Successful in 2m23s Details
Build and Deploy Chitfund / build-frontend (push) Successful in 1m11s Details

This commit is contained in:
deepkoluguri 2026-05-11 21:49:37 +00:00
parent 5a5e61a603
commit 5311eeb1b5
1 changed files with 21 additions and 10 deletions

View File

@ -7,31 +7,42 @@ jobs:
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=http://192.168.8.248:3000/deepkoluguri/chitfund.git \
--context-sub-path=backend \
--git=branch=master,single-branch=true \
--context=dir:///workspace/deepkoluguri/chitfund/backend \
--dockerfile=Dockerfile \
--destination=192.168.8.250:5000/chitfund-backend:latest \
--insecure \
--skip-tls-verify \
--insecure-pull
--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=http://192.168.8.248:3000/deepkoluguri/chitfund.git \
--context-sub-path=luckychit \
--git=branch=master,single-branch=true \
--context=dir:///workspace/deepkoluguri/chitfund/luckychit \
--dockerfile=Dockerfile \
--destination=192.168.8.250:5000/chitfund-frontend:latest \
--insecure \
--skip-tls-verify \
--insecure-pull
--skip-tls-verify