Skip to content

CD github action added; test push 2 #2

CD github action added; test push 2

CD github action added; test push 2 #2

name: CD-Backend Deploy Docker image
on:
workflow_run:
workflows: ["CI"]
types:
- completed
pull_request:
branches:
- main
jobs:
deploy-docker-image:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- 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 .
- name: Push Docker image
run: |
docker push enricogoerlitz/bp2-backend-amd64v2:latest