diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..27da075 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,60 @@ +name: CD + +on: + release: + types: [published] + +jobs: + Release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up PDM + uses: pdm-project/setup-pdm@v4 + with: + python-version: 3.9 + + - name: Install dependencies + run: pdm install + + - name: Build and publish Python package + env: + PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + run: | + pdm build + pdm publish --username __token__ --password $PYPI_API_TOKEN + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # - name: Build and push Jupyter Spark image + # uses: docker/build-push-action@v5 + # with: + # context: . + # file: docker/Dockerfile-jupyter-spark + # platforms: linux/amd64 + # push: true + # tags: | + # weygu/pyspark-notebook-nebulagraph:${{ github.event.release.tag_name }} + # weygu/pyspark-notebook-nebulagraph:latest + + - name: Build and push Jupyter NetworkX image + uses: docker/build-push-action@v5 + with: + context: . + file: docker/Dockerfile-jupyter-networkx + platforms: linux/amd64,linux/arm64 + push: true + tags: | + weygu/ngai-jupyter-networkx:${{ github.event.release.tag_name }} + weygu/ngai-jupyter-networkx:latest \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9591445..e41118b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,4 @@ - -name: Tests +name: CI on: pull_request: @@ -34,4 +33,4 @@ jobs: - name: Run Unit Tests run: pdm run test - name: Run Integration Tests - run: pdm run int-test + run: pdm run int-test \ No newline at end of file diff --git a/docker/Dockerfile-jupyter-networkx b/docker/Dockerfile-jupyter-networkx index 78984b7..78837f2 100644 --- a/docker/Dockerfile-jupyter-networkx +++ b/docker/Dockerfile-jupyter-networkx @@ -1,7 +1,7 @@ FROM jupyter/minimal-notebook:python-3.9.13 RUN pip install ng_ai[networkx] && \ - pip install ipython-ngql && \ + pip install jupyter_nebulagraph && \ pip install pyvis && \ rm -rf /home/$NB_USER/.cache/pip