Skip to content

Merge pull request #5 from BestLemoon/master #9

Merge pull request #5 from BestLemoon/master

Merge pull request #5 from BestLemoon/master #9

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
env:
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v3.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and Push Docker Image
run: |
docker build -t ${{ env.IMAGE_NAME }}:latest .
docker push ${{ env.IMAGE_NAME }}:latest