name: Docker Image CI

on:
  push:
    branches: [ "master" ]

jobs:

  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    -
      name: Login to Docker Hub
      uses: docker/login-action@v2
      with:
        username: ${{ secrets.DOCKERHUB_USERNAME }}
        password: ${{ secrets.DOCKERHUB_TOKEN }}
    - 
      name: Build the Docker image
      uses: docker/build-push-action@v4
      with:
        context: .
        push: true
        tags: ricterz/nhentai:latest
