Skip to content

Commit

Permalink
amd64 addition
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Jul 14, 2024
1 parent c18500f commit 0e63c6b
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/docker-image-amd64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Docker Image AMD64

on:
release:
types: [published]
workflow_dispatch:

jobs:
upload_ipfs_cluster:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ORG_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build ipfs-cluster
run: cd ./docker && source env_release_amd64.sh && cd ./ipfs-cluster && bash ./build.sh

build_fxsupport:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ORG_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build fxsupport
run: cd ./docker && source env_release_amd64.sh && cd ./fxsupport && bash ./build.sh

build_go_fula:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ORG_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build go-fula
run: cd ./docker && source env_release_amd64.sh && cd ./go-fula && bash ./build.sh

build_node:
runs-on: self-hosted

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ORG_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build node
run: cd ./docker && source env_release_amd64.sh && cd ./sugarfunge-node && bash ./build.sh
38 changes: 38 additions & 0 deletions docker/env_release_amd64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#,linux/arm/v7 linux/arm64 linux/amd64
export ARCH_SUPPORT="linux/amd64"

export DOCKER_REPO="functionland"
export DEFAULT_TAG="release_amd64"

#build fxsupport
export FX_SUPPORT_IMAGE="$DOCKER_REPO/fxsupport"
export FX_SUPPORT_DOCKER_TAG="$DEFAULT_TAG"

#build go-fula
export GO_FULA_BRANCH="main"
export GO_FULA_IMAGE="$DOCKER_REPO/go-fula"
export GO_FULA_DOCKER_TAG="$DEFAULT_TAG"

#build ipfs-cluster
export IPFS_CLUSTER_BRANCH="master"
export IPFS_CLUSTER_IMAGE="$DOCKER_REPO/ipfs-cluster"
export IPFS_CLUSTER_DOCKER_TAG="$DEFAULT_TAG"

#build node and node-api
export SUGARFUNGE_NODE_BRANCH="main"
export SUGARFUNGE_API_BRANCH="main"
export PROOF_ENGINE_BRANCH="main"
export SUGARFUNGE_NODE_IMAGE="$DOCKER_REPO/node"
export SUGARFUNGE_NODE_DOCKER_TAG="$DEFAULT_TAG"

#create .env in fxsupport/linux/.env
echo "docker images will produce with following variables:"
DOCKER_URI="index.docker.io"
tee fxsupport/linux/.env << END
GO_FULA=$DOCKER_URI/$DOCKER_REPO/go-fula:$GO_FULA_DOCKER_TAG
FX_SUPPROT=$DOCKER_URI/$DOCKER_REPO/fxsupport:$FX_SUPPORT_DOCKER_TAG
SUGARFUNGE_NODE=$DOCKER_URI/$DOCKER_REPO/node:$SUGARFUNGE_NODE_DOCKER_TAG
IPFS_CLUSTER=$DOCKER_URI/$DOCKER_REPO/ipfs-cluster:$IPFS_CLUSTER_DOCKER_TAG
WPA_SUPLICANT_PATH=/etc
CURRENT_USER=pi
END

0 comments on commit 0e63c6b

Please sign in to comment.