Skip to content

Add Docker build workflow #35

Add Docker build workflow

Add Docker build workflow #35

Workflow file for this run

name: Build and Publish to GHCR
on:
push:
branches:
- master
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12' # <-- теперь 3.12
- name: Upgrade pip and install dependencies
run: |
python -m pip install --upgrade pip
pip install --no-cache-dir -r requirements.txt
- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: |
docker build -t ghcr.io/${{ github.repository_owner }}/secretai-chat:v2 .
- name: Push to GHCR
run: |
docker push ghcr.io/${{ github.repository_owner }}/secretai-chat:v2