Skip to content

Update and rename docker-image.yml to ci_action.yml #1

Update and rename docker-image.yml to ci_action.yml

Update and rename docker-image.yml to ci_action.yml #1

Workflow file for this run

name: ci_action
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- uses: actions/checkout@v3
- name: Build and push the Docker image
run:
docker build -t ${{ secrets.DOCKER_HUB_USER }}/sessions-project:githubactions ./src
docker push ${{ secrets.DOCKER_HUB_USER }}/sessions-project:githubactions
- uses: actions/checkout@v2
- name: Install Python 3
uses: actions/setup-python@v1
with:
python-version: 3.10.13
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r src/requirements.txt
- name: Run tests with pytest
run:
cd ..
pytest