name: Build Agents Runtime on: push: branches: - main paths: - 'src/**' - 'Dockerfile' - 'requirements.txt' jobs: build: runs-on: ubuntu-latest env: DOCKER_HOST: tcp://172.17.0.1:2375 steps: - name: Checkout uses: actions/checkout@v3 - name: Build and push (Kaniko) run: | SHORT_SHA="${GITHUB_SHA::7}" IMAGE_TAG="192.168.8.250:5000/agents-runtime:latest" JOB_CONTAINER=$(docker ps --format '{{.Names}}' | grep 'GITEA-ACTIONS-TASK' | head -1) docker run --rm \ --volumes-from "$JOB_CONTAINER" \ gcr.io/kaniko-project/executor:latest \ --context=dir:///workspace/deepkoluguri/agents-runtime \ --dockerfile=Dockerfile \ --destination="${IMAGE_TAG}" \ --destination="192.168.8.250:5000/agents-runtime:${SHORT_SHA}" \ --insecure \ --skip-tls-verify