Skip to content

Commit f7d545e

Browse files
committed
dev image is back
1 parent 2b72d4c commit f7d545e

File tree

3 files changed

+72
-2
lines changed

3 files changed

+72
-2
lines changed

.github/workflows/image-dev.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: dev-image
2+
on:
3+
push:
4+
branches: ["master"]
5+
paths:
6+
# Source files in each member
7+
- "compute/src/**"
8+
- "p2p/src/**"
9+
- "workflows/src/**"
10+
# Cargo in each member
11+
- "compute/Cargo.toml"
12+
- "p2p/Cargo.toml"
13+
- "workflows/Cargo.toml"
14+
# root-level changes
15+
- "Cargo.lock"
16+
- "Cross.toml"
17+
- "Dockerfile"
18+
- "compose.yml"
19+
# workflow itself
20+
- ".github/workflows/build_dev_container.yml"
21+
22+
jobs:
23+
build-and-push:
24+
name: Build and Push
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v3
30+
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v3
33+
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v3
36+
37+
- name: Login to Docker Hub
38+
uses: docker/login-action@v3
39+
with:
40+
username: ${{ secrets.DOCKERHUB_USERNAME }}
41+
password: ${{ secrets.DOCKERHUB_TOKEN }}
42+
43+
- name: Get Unix Time
44+
id: timestamp
45+
run: echo "timestamp=$(date +%s)" >> $GITHUB_OUTPUT
46+
47+
- name: Get SHA
48+
id: sha
49+
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
50+
51+
- name: Get Branch Name
52+
id: branch
53+
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
54+
55+
- name: Set Image Tag
56+
id: itag
57+
run: echo "itag=${{ steps.branch.outputs.branch }}-${{ steps.sha.outputs.sha }}-${{ steps.timestamp.outputs.timestamp }}" >> $GITHUB_OUTPUT
58+
59+
- name: Build and push
60+
uses: docker/build-push-action@v6
61+
env:
62+
IMAGE_TAG: ${{ steps.itag.outputs.itag }}
63+
with:
64+
platforms: linux/amd64, linux/arm64, linux/arm, linux/arm64v8
65+
push: true
66+
tags: |
67+
firstbatch/dkn-compute-node:unstable
68+
firstbatch/dkn-compute-node:${{ env.IMAGE_TAG }}

.github/workflows/image.yml renamed to .github/workflows/image-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: docker image
1+
name: release-image
22
on:
33
release:
44
types: [published]

compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ services:
1111
DKN_P2P_LISTEN_ADDR: ${DKN_P2P_LISTEN_ADDR}
1212
DKN_RELAY_NODES: ${DKN_RELAY_NODES}
1313
DKN_BOOTSTRAP_NODES: ${DKN_BOOTSTRAP_NODES}
14-
# Api Keys
14+
# API Keys
1515
OPENAI_API_KEY: ${OPENAI_API_KEY}
16+
GEMINI_API_KEY: ${GEMINI_API_KEY}
17+
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY}
1618
SERPER_API_KEY: ${SERPER_API_KEY}
1719
JINA_API_KEY: ${JINA_API_KEY}
1820
# Ollama

0 commit comments

Comments
 (0)