Skip to content

github actions: add login to docker hub #6

github actions: add login to docker hub

github actions: add login to docker hub #6

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag moosavismd/uid-app:${{github.run_id}}
- name: Push docker image
run: docker push moosavismd/uid-app:${{github.run_id}}