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