Skip to content

Update ci.yml without explicit Dockerfile #7

Update ci.yml without explicit Dockerfile

Update ci.yml without explicit Dockerfile #7

Workflow file for this run

name: Build FastAPI Docker Image and Push to DockerHub
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
# TODO: Add testing
docker:
needs: test
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: src
push: true
tags: san99tiago/fastapi-docker-github-actions:latest