Skip to content

CD-Backend

CD-Backend #16

Workflow file for this run

name: CD-Backend
on:
workflow_run:
workflows: ["CI-Backend"] # needs to be the NAME (top of the file) of CI Workflow!
types:
- completed
jobs:
cd-backend:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r app/requirements.txt
- name: Log in to Docker Hub
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Build Docker image
run: |
docker build --platform linux/amd64/v2 -t enricogoerlitz/bp2-backend-amd64v2 -f ./docker/Dockerfile .
- name: Push Docker image
run: |
docker push enricogoerlitz/bp2-backend-amd64v2:latest