Skip to content

Commit e008aba

Browse files
committed
Github workflow for nightly builds
1 parent 9dd4e3f commit e008aba

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Nightly Image Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
env:
10+
PYTHON_VERSION: 3.8
11+
POETRY_VERSION: 1.5.1
12+
QUAY_ORGANIZATION: 'jpetrlik'
13+
SDK_FILE: 'codeflare_sdk-0.0.0.dev0.tar.gz'
14+
IMAGE_TAG: 'dev'
15+
16+
jobs:
17+
nightly-build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout the repository
21+
uses: actions/checkout@v3
22+
- name: Install Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: ${{ env.PYTHON_VERSION }}
26+
- name: Install Poetry
27+
uses: abatilo/actions-poetry@v2
28+
with:
29+
poetry-version: ${{ env.POETRY_VERSION }}
30+
- name: Run poetry install
31+
run: poetry install --with docs
32+
- name: Run poetry build
33+
run: poetry build
34+
- name: Copy SDK package
35+
run: cp dist/${SDK_FILE} custom-nb-image
36+
- name: Modify Dockerfile to use locally build SDK
37+
run: |
38+
sed -i "s/ARG SDK_VERSION=.*/COPY ${{ env.SDK_FILE }} ./" custom-nb-image/Dockerfile
39+
sed -i "s/codeflare-sdk==.*/${{ env.SDK_FILE }}\\\\/" custom-nb-image/Dockerfile
40+
- name: Image Build
41+
working-directory: custom-nb-image
42+
run: docker build -t quay.io/${{ env.QUAY_ORGANIZATION }}/notebook:${{ env.IMAGE_TAG }} .
43+
- name: Login to Quay.io
44+
uses: docker/login-action@v2
45+
with:
46+
registry: quay.io
47+
username: ${{ secrets.QUAY_ID }}
48+
password: ${{ secrets.QUAY_TOKEN }}
49+
- name: Image Push
50+
run: docker push quay.io/${{ env.QUAY_ORGANIZATION }}/notebook:${{ env.IMAGE_TAG }}

0 commit comments

Comments
 (0)