mirror of
https://github.com/fsecada01/Pygentic-AI.git
synced 2026-05-12 04:04:57 +00:00
✅ 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>
47 lines
1.5 KiB
YAML
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
|