Skip to content

Commit ac43ea0

Browse files
Adding Image Build/Push to CI (#56)
* Adding Image Build/Push to CI * Removed unnecessary dockerfile step * Deployment ready * Add newline * Update workflow comment Co-authored-by: Michael Clifford <mcliffor@redhat.com> --------- Co-authored-by: Michael Clifford <mcliffor@redhat.com>
1 parent 5c38d79 commit ac43ea0

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

.github/workflows/image.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will build an image for the codeflare notebook image, then push the image to the `project-codeflare` quay repo
2+
3+
name: Image
4+
5+
on:
6+
push:
7+
branches: [ "main" ]
8+
paths:
9+
- "custom-nb-image/VERSION"
10+
11+
jobs:
12+
push:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Grab New Version Tag
18+
run: |
19+
echo "tag=$(cat custom-nb-image/VERSION)" >> $GITHUB_ENV
20+
21+
- name: Image Build
22+
run: |
23+
cd custom-nb-image
24+
docker build -t quay.io/project-codeflare/notebook:${{ env.tag }} .
25+
docker tag quay.io/project-codeflare/notebook:${{ env.tag }} quay.io/project-codeflare/notebook:latest
26+
27+
- name: Login to Quay.io
28+
uses: docker/login-action@v2
29+
with:
30+
registry: quay.io
31+
username: ${{ secrets.QUAY_ID }}
32+
password: ${{ secrets.QUAY_TOKEN }}
33+
34+
- name: Image Push
35+
run: |
36+
docker push quay.io/project-codeflare/notebook:${{ env.tag }}
37+
docker push quay.io/project-codeflare/notebook:latest

custom-nb-image/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ RUN pip install -r requirements.txt
2222

2323
RUN pip uninstall pickle5 -y
2424

25-
# Pull notebooks in
26-
ADD codeflare/ /home/codeflare
27-
2825
# Install codeflare-cli and other libraries
2926
RUN pip install codeflare-sdk==0.2.1 \
3027
datasets==2.6.1 \

custom-nb-image/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sdk0.2.1-v1

0 commit comments

Comments
 (0)