diff --git a/.github/workflows/build-node-container.yml b/.github/workflows/build-node-container.yml new file mode 100644 index 00000000..d98f287c --- /dev/null +++ b/.github/workflows/build-node-container.yml @@ -0,0 +1,42 @@ +name: Build and Publish Node Container + +on: + push: + branches: + - main + - k-mistele/add-compose-configurations # for testing + paths: + - 'Dockerfile-node' + - 'node/**' + - '.github/**' + - '!docker-compose*' + - 'poetry.lock' + - 'pyproject.toml' + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile-node + push: true + platforms: linux/amd64,linux/arm64 + tags: | + napthaai/node:latest + napthaai/node:${{ github.sha }} \ No newline at end of file