Skip to content

Commit 2f61bff

Browse files
committed
fix: registry latest and preview
1 parent 91cb76e commit 2f61bff

File tree

5 files changed

+123
-13
lines changed

5 files changed

+123
-13
lines changed

.github/Dockerfile

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

.github/Dockerfile.latest

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM python:3.12
16+
17+
# Install git and install veadk-python via git
18+
RUN apt-get install -y git && \
19+
pip3 install --no-cache-dir git+https://github.com/volcengine/veadk-python.git && \
20+
apt-get clean && rm -rf /var/lib/apt/lists/*

.github/Dockerfile.preview

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM python:3.12
16+
17+
# Install git and install veadk-python via git
18+
RUN apt-get install -y git && \
19+
pip3 install --no-cache-dir git+https://github.com/volcengine/veadk-python.git && \
20+
apt-get clean && rm -rf /var/lib/apt/lists/*
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Push Lastest Image to ARK Registry
16+
17+
on:
18+
push:
19+
# Trigger only when pushing tags
20+
tags:
21+
- '*'
22+
workflow_dispatch:
23+
24+
jobs:
25+
build-and-push:
26+
runs-on: ubuntu-latest
27+
# This job is executed only when the repository is the main repository.
28+
if: github.repository == 'zakahan/veadk-python'
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Set up Docker Buildx
36+
uses: docker/setup-buildx-action@v3
37+
38+
- name: Login to Volcengine Container Registry
39+
uses: docker/login-action@v3
40+
with:
41+
registry: test-veadk-cn-beijing.cr.volces.com
42+
username: ${{ secrets.REGISTRY_USERNAME }}
43+
password: ${{ secrets.REGISTRY_PASSWORD }}
44+
45+
- name: Extract metadata
46+
id: meta
47+
uses: docker/metadata-action@v5
48+
with:
49+
images: test-veadk-cn-beijing.cr.volces.com/veadk/veadk-python
50+
tags: |
51+
latest
52+
type=ref,event=tag
53+
54+
55+
- name: Build and push
56+
uses: docker/build-push-action@v5
57+
with:
58+
context: .
59+
file: .github/Dockerfile.latest
60+
push: true
61+
tags: ${{ steps.meta.outputs.tags }}
62+
labels: ${{ steps.meta.outputs.labels }}
63+
cache-from: type=gha
64+
cache-to: type=gha,mode=max

.github/workflows/lastest-image-to-ark-cr.yaml renamed to .github/workflows/preview-image-to-ark-cr.yaml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
name: Push Lastest Image to ARK Registry
1+
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Push Preview Image to ARK Registry
216

317
on:
418
push:
@@ -9,7 +23,7 @@ jobs:
923
build-and-push:
1024
runs-on: ubuntu-latest
1125
# This job is executed only when the repository is the main repository.
12-
if: github.repository == 'volcengine/veadk-python'
26+
if: github.repository == 'zakahan/veadk-python'
1327
steps:
1428
- name: Checkout code
1529
uses: actions/checkout@v4
@@ -30,17 +44,15 @@ jobs:
3044
id: meta
3145
uses: docker/metadata-action@v5
3246
with:
33-
images: test-veadk-cn-beijing.cr.volces.com/veadk/veadk-python312
47+
images: test-veadk-cn-beijing.cr.volces.com/veadk/veadk-python
3448
tags: |
35-
type=sha,format=short
36-
type=ref,event=branch
37-
latest
49+
preview
3850
3951
- name: Build and push
4052
uses: docker/build-push-action@v5
4153
with:
4254
context: .
43-
file: .github/Dockerfile
55+
file: .github/Dockerfile.preview
4456
push: true
4557
tags: ${{ steps.meta.outputs.tags }}
4658
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)