Skip to content

Commit beca43b

Browse files
authored
Merge pull request #2 from langgenius/feat/0.2.2
feat 0.2.2
2 parents 5ce1bc3 + 0471ce1 commit beca43b

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

.github/workflows/build-amd64.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build AMD64
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
release:
8+
types: [published]
9+
10+
env:
11+
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
12+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
13+
DIFY_SANDBOX_IMAGE_NAME: ${{ vars.DIFY_SANDBOX_IMAGE_NAME || 'langgenius/dify-sandbox' }}
14+
15+
jobs:
16+
build_amd64:
17+
name: Build AMD64
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Login to Docker Hub
25+
uses: docker/login-action@v2
26+
with:
27+
username: ${{ env.DOCKERHUB_USER }}
28+
password: ${{ env.DOCKERHUB_TOKEN }}
29+
30+
- name: Extract metadata (tags, labels) for Docker
31+
id: meta
32+
uses: docker/metadata-action@v5
33+
with:
34+
images: ${{ env.DIFY_SANDBOX_IMAGE_NAME }}
35+
tags: |
36+
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
37+
type=ref,event=branch
38+
type=sha,enable=true,priority=100,prefix=,suffix=,format=long
39+
type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
40+
41+
- name: Install System Dependencies
42+
run: sudo apt-get install -y pkg-config gcc libseccomp-dev
43+
44+
- name: Set up Go
45+
uses: actions/setup-go@v4
46+
with:
47+
go-version: 1.20.6
48+
49+
- name: Install dependencies
50+
run: go mod tidy
51+
52+
- name: Run Build Binary
53+
run: bash ./build/build_amd64.sh
54+
55+
- name: Run Build Docker Image
56+
run: docker build -t ${{ env.DIFY_SANDBOX_IMAGE_NAME }}:${{ steps.meta.outputs.tag }}-amd64 -f ./docker/amd64/dockerfile .
57+
58+
- name: Run Push Docker Image
59+
run: docker push ${{ env.DIFY_SANDBOX_IMAGE_NAME }}:${{ steps.meta.outputs.tag }}

.github/workflows/build-arm64.yml

Whitespace-only changes.

.github/workflows/build-universal.yml

Whitespace-only changes.

0 commit comments

Comments
 (0)