Files
Pygentic-AI/.github/workflows/docker-image.yml
Francis Secada ad1454ff3f
Some checks failed
Bandit / bandit (push) Has been cancelled
Docker Image CI / build (3.13) (push) Has been cancelled
Production Deployment Readiness
 Local build verified successfully
 Environment variables complete  
 CI/CD workflows updated
 Build process simplified (source copy vs git clone)
 All production-readiness fixes applied

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 19:11:03 -05:00

47 lines
1.5 KiB
YAML

name: Docker Image CI
on:
pull_request:
branches: [ "*_deploy"]
push:
branches: [ "*_deploy", "feature_*", "main" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
max-parallel: 4
matrix:
python-version: [ "3.13" ]
steps:
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Sanitize branch name for Docker tag
shell: bash
run: echo "sanitized_branch=$(echo '${{ steps.extract_branch.outputs.branch }}' | sed 's/\//-/g')" >> $GITHUB_OUTPUT
id: sanitize_branch
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Build the Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
s3docker.francissecada.com/pygentic_ai:${{ steps.sanitize_branch.outputs.sanitized_branch }}.${{ steps.date.outputs.date }}
s3docker.francissecada.com/pygentic_ai:${{ steps.sanitize_branch.outputs.sanitized_branch }}-latest
pull: true