Skip to content

Commit 0f14824

Browse files
committed
docker changes
Signed-off-by: Mandana Vaziri <[email protected]>
1 parent 9220a27 commit 0f14824

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Quay Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
env:
11+
REGISTRY: quay.io
12+
# github.repository as account/repo
13+
IMAGE_NAME: project_pdl/pdl
14+
15+
jobs:
16+
# Build and push a multi-platform Docker image to Docker Hub
17+
publish-image:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
packages: write
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v3
26+
27+
- name: Docker Setup QEMU
28+
uses: docker/setup-qemu-action@v2
29+
30+
- name: Set up Docker Buildx
31+
uses: docker/setup-buildx-action@v2
32+
33+
- name: Login to Docker Hub
34+
uses: docker/login-action@v2
35+
with:
36+
registry: ${{ env.REGISTRY }}
37+
username: ${{ secrets.QUAYIO_USERNAME }}
38+
password: ${{ secrets.QUAYIO_TOKEN }}
39+
40+
- name: Build and push ${{ github.ref_name }} to ${{ env.REGISTRY }}
41+
uses: docker/build-push-action@v4
42+
with:
43+
context: .
44+
platforms: linux/amd64,linux/arm64
45+
push: true
46+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest

src/pdl/pdl.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ def main():
234234
watsonx_apikey = "WATSONX_APIKEY=" + os.environ["WATSONX_APIKEY"]
235235
watsonx_url = "WATSONX_URL=" + os.environ["WATSONX_URL"]
236236
watsonx_project_id = "WATSONX_PROJECT_ID=" + os.environ["WATSONX_PROJECT_ID"]
237+
replicate_api_token = "REPLICATE_API_TOKEN=" + os.environ["REPLICATE_API_TOKEN"]
238+
237239
local_dir = os.getcwd() + ":/local"
238240
try:
239241
args = sys.argv[1:]
@@ -252,6 +254,8 @@ def main():
252254
watsonx_url,
253255
"-e",
254256
watsonx_project_id,
257+
"-e",
258+
replicate_api_token,
255259
"--rm",
256260
"-it",
257261
"quay.io/project_pdl/pdl",

0 commit comments

Comments
 (0)