Skip to content

Commit

Permalink
Merge pull request #44 from wey-gu/add_louvain
Browse files Browse the repository at this point in the history
cicd: add pypi release and docker push
  • Loading branch information
wey-gu authored Aug 22, 2024
2 parents f799431 + a363fff commit 54ffd96
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 4 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

name: Tests
name: CI

on:
pull_request:
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion docker/Dockerfile-jupyter-networkx
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 54ffd96

Please sign in to comment.