diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml new file mode 100644 index 00000000..cc5f4abb --- /dev/null +++ b/.github/workflows/docker-build.yaml @@ -0,0 +1,36 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - main + - develop + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in 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: . + file: Dockerfile + push: true + tags: | + christianlouis/document-processor:latest + christianlouis/document-processor:${{ github.sha }}