Skip to content

Commit ad08d1f

Browse files
committed
WIP
1 parent 52ba444 commit ad08d1f

File tree

3 files changed

+26
-54
lines changed

3 files changed

+26
-54
lines changed

.github/workflows/image.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ jobs:
2727
- name: Checkout the repository
2828
uses: actions/checkout@v3
2929
- name: Change version in pyproject.toml
30-
uses: ciiiii/[email protected]
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

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ The following instructions apply when doing release manually.
6565
* Check and update the version in "custom-nb-image/VERSION" file.
6666
* Update the codeflare-sdk version in "custom-nb-image/Dockerfile".
6767
* Commit all the changes to the repository.
68-
* The Github "Image" workflow should take care about the building and publishing of the new image. If not you can
69-
use the following instructions to build and publish image manually.
68+
* Use the following instructions to build and publish image manually.
7069
* Change directory to custom-nb-image. `cd custom-nb-image`
7170
* Get tag `export tag=$(cat VERSION)`
7271
* Build the Docker image. `docker build -t quay.io/project-codeflare/notebook:${tag} .`

0 commit comments

Comments
 (0)