Skip to content

Commit

Permalink
Create docker-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
VikramxD authored Nov 7, 2024
1 parent a5b0c2a commit d89d601
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Docker Build and Push

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
file: ./DockerFileFolder/Dockerfile
push: true
tags: ${{secrets.DOCKER_USERNAME }}/minimochi:latest

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit d89d601

Please sign in to comment.