Skip to content

Update docker login action version #2

Update docker login action version

Update docker login action version #2

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main","Day29" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build ./backend --tag fastapi-ithome2023:latest
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push image to DockerHub
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/fastapi-ithome2023:latest