From 16ab8d4c0ec934bdd607d4d0019f3f8656bbaa05 Mon Sep 17 00:00:00 2001 From: Sonu7552 <119855066+Sonu7552@users.noreply.github.com> Date: Sat, 13 Dec 2025 00:48:15 +0500 Subject: [PATCH] Add GitHub Actions workflow for Docker build and push --- .github/workflows/main.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..ecf481b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,26 @@ +name: Build and Push Docker Image + +on: + push: + branches: [ "main" ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and Push + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: sonu7552/aspnetrun-realworld:latest