2727 - name : Checkout the repository
2828 uses : actions/checkout@v3
2929 - name : Change version in pyproject.toml
30- 31- with :
32- file : " pyproject.toml"
33- key : " tool.poetry.version"
34- value : " ${{ github.event.inputs.new_version }}"
30+ run : sed -i "s/\(^version = \"\)\(.*\)\"/\1${{ github.event.inputs.new_version }}\"/" pyproject.toml
3531 - name : Install Python
3632 uses : actions/setup-python@v4
3733 with :
@@ -46,23 +42,37 @@ jobs:
4642 run : poetry build
4743 - name : Create new documentation
4844 run : poetry run pdoc --html -o docs src/codeflare_sdk && pushd docs && rm -rf cluster job utils && mv codeflare_sdk/* . && rm -rf codeflare_sdk && popd
49- - name : Set Pypi token
50- run : poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
51- - name : Publish new release to Pypi repository
52- run : poetry publish -r test-pypi
45+ # - name: Set Pypi repository
46+ # run: poetry config repositories.test-pypi https://test.pypi.org/legacy/
47+ # - name: Set Pypi token
48+ # run: poetry config pypi-token.test-pypi ${{ secrets.PYPI_TOKEN }}
49+ # - name: Publish new release to Pypi repository
50+ # run: poetry publish -r test-pypi
51+
5352 - name : Commit the pre-release changes
5453 uses : stefanzweifel/git-auto-commit-action@v4
5554 with :
55+ file_pattern : ' docs pyproject.toml'
5656 commit_message : " New release: ${{ github.event.inputs.new_version }}"
5757 - name : Create Github release
5858 uses : ncipollo/release-action@v1
5959 with :
6060 tag : " v${{ github.event.inputs.new_version }}"
61+
6162 - name : Update SDK version in the Docker image
62- run : sed -i "s/\(.*codeflare-sdk==\)[^\\s]*\(.*\)/\${{ github.event.inputs.new_version }}\2/" custom-nb-image/Dockerfile
63- - name : Update Docker image version
64- run : echo ${{ github.event.inputs.new_version }} > custom-nb-image/VERSION
65- - name : Commit new version of the Docker image
66- uses : stefanzweifel/git-auto-commit-action@v4
63+ run : sed -i "s/\(.*codeflare-sdk==\)[^\\s]*\(.*\)/\1${{ github.event.inputs.new_version }}\2/" custom-nb-image/Dockerfile
64+ - name : Image Build
65+ run : |
66+ cd custom-nb-image
67+ docker build -t quay.io/jpetrlik/notebook:${{ github.event.inputs.image_tag }} .
68+ docker tag quay.io/jpetrlik/notebook:${{ github.event.inputs.image_tag }} quay.io/jpetrlik/notebook:latest
69+ - name : Login to Quay.io
70+ uses : docker/login-action@v2
6771 with :
68- commit_message : " New image tag: ${{ github.event.inputs.image_tag }}"
72+ registry : quay.io
73+ username : ${{ secrets.QUAY_ID }}
74+ password : ${{ secrets.QUAY_TOKEN }}
75+ - name : Image Push
76+ run : |
77+ docker push quay.io/jpetrlik/notebook:${{ github.event.inputs.image_tag }}
78+ docker push quay.io/jpetrlik/notebook:latest
0 commit comments