-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9692afc
commit 9b0c3b5
Showing
9 changed files
with
212 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: WeDPR-Component docker ci | ||
on: | ||
push: | ||
paths-ignore: | ||
- "docs/**" | ||
- "Changelog.md" | ||
- "README.md" | ||
tags: | ||
- 'v3.*.*' | ||
pull_request: | ||
paths-ignore: | ||
- "docs/**" | ||
- "Changelog.md" | ||
- "README.md" | ||
release: | ||
types: [prereleased] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
RUST_BACKTRACE: 1 | ||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | ||
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16 | ||
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 | ||
|
||
jobs: | ||
build-docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Get branch name | ||
uses: nelonoel/[email protected] | ||
- name: Fetch tag | ||
run: | | ||
git fetch --tags --force | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_FISCOPR_USER }} | ||
password: ${{ secrets.DOCKER_FISCOPR_TOKEN }} | ||
- name: Get git tag | ||
uses: little-core-labs/[email protected] | ||
id: tag_data | ||
with: | ||
tagRegex: (.*) # Optional. Returns specified group text as tag name. Full tag string is returned if regex is not defined. | ||
tagRegexGroup: 1 # Optional. Default is 1. | ||
# the model image | ||
- name: Build and Push model images | ||
run: | | ||
[[ ${{github.ref}} == */tags/* ]] && MODEL_DOCKER_TAG="${GIT_TAG_NAME}" || MODEL_DOCKER_TAG="${BRANCH_NAME}" | ||
MODEL_DOCKER_TAG="fiscoorg/wedpr-model-service:${MODEL_DOCKER_TAG}" | ||
echo "* Begin to build model docker: ${MODEL_DOCKER_TAG}" | ||
cd WeDPR-Component/docker-files/model/model | ||
docker build -t ${MODEL_DOCKER_TAG} . | ||
echo "* Build model docker: ${MODEL_DOCKER_TAG} success" | ||
docker push ${MODEL_DOCKER_TAG} | ||
echo "* Push model docker: ${MODEL_DOCKER_TAG} success" | ||
# the wedpr-gateway-service image | ||
- name: Build and Push wedpr-gateway-service images | ||
run: | | ||
[[ ${{github.ref}} == */tags/* ]] && GW_DOCKER_TAG="${GIT_TAG_NAME}" || GW_DOCKER_TAG="${BRANCH_NAME}" | ||
GW_DOCKER_TAG="fiscoorg/wedpr-gateway-service:${GW_DOCKER_TAG}" | ||
echo "* Begin to build wedpr-gateway-service docker: ${GW_DOCKER_TAG}" | ||
cd WeDPR-Component/docker-files/cpp/ | ||
docker build --target wedpr-gateway-service -t ${GW_DOCKER_TAG} . | ||
echo "* Build wedpr-gateway-service docker: ${GW_DOCKER_TAG} success" | ||
docker push ${GW_DOCKER_TAG} | ||
echo "* Push wedpr-gateway-service docker: ${GW_DOCKER_TAG} success" | ||
# the wedpr-pro-node-service image | ||
- name: Build and Push wedpr-pro-node-service images | ||
[[ ${{github.ref}} == */tags/* ]] && NODE_DOCKER_TAG="${GIT_TAG_NAME}" || NODE_DOCKER_TAG="${BRANCH_NAME}" | ||
NODE_DOCKER_TAG="fiscoorg/wedpr-pro-node-service:${NODE_DOCKER_TAG}" | ||
echo "* Begin to build wedpr-pro-node-service docker: ${NODE_DOCKER_TAG}" | ||
cd WeDPR-Component/docker-files/cpp/ | ||
docker build --target wedpr-pro-node-service -t ${NODE_DOCKER_TAG} . | ||
echo "* Build wedpr-pro-node-service docker: ${NODE_DOCKER_TAG} success" | ||
docker push ${NODE_DOCKER_TAG} | ||
echo "* Push wedpr-pro-node-service docker: ${NODE_DOCKER_TAG} success" | ||
# the wedpr-mpc-service image | ||
- name: Build and Push wedpr-mpc-service images | ||
[[ ${{github.ref}} == */tags/* ]] && MPC_DOCKER_TAG="${GIT_TAG_NAME}" || MPC_DOCKER_TAG="${BRANCH_NAME}" | ||
MPC_DOCKER_TAG="fiscoorg/wedpr-mpc-service:${MPC_DOCKER_TAG}" | ||
echo "* Begin to build wedpr-mpc-service docker: ${MPC_DOCKER_TAG}" | ||
cd WeDPR-Component/docker-files/cpp/ | ||
docker build --target wedpr-mpc-service -t ${MPC_DOCKER_TAG} . | ||
echo "* Build wedpr-mpc-service docker: ${MPC_DOCKER_TAG} success" | ||
docker push ${MPC_DOCKER_TAG} | ||
echo "* Push wedpr-mpc-service docker: ${MPC_DOCKER_TAG} success" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Manual trigger wedpr-model-service-base-image docker image build | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
logLevel: | ||
description: 'Log level' | ||
required: true | ||
default: 'warning' | ||
tags: | ||
description: 'the input tag' | ||
|
||
jobs: | ||
manual-build-model-base-docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Get branch name | ||
uses: nelonoel/[email protected] | ||
- name: Fetch tag | ||
run: | | ||
git fetch --tags --force | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_FISCOPR_USER }} | ||
password: ${{ secrets.DOCKER_FISCOPR_TOKEN }} | ||
|
||
# the model image | ||
- name: Build and Push wedpr-model-service-base-image images | ||
run: | | ||
echo "* Manual build wedpr-model-service-base-image image, docker version: ${{ github.event.inputs.tags }}" | ||
DOCKER_TAG="wedpr-model-service-base-image:${{ github.event.inputs.tags }}" | ||
echo "* Begin to build ${DOCKER_TAG}" | ||
cd WeDPR-Component/docker-files/model/base | ||
docker build docker build -t ${DOCKER_TAG} . | ||
echo "* Build ${DOCKER_TAG} success" | ||
docker push ${DOCKER_TAG} | ||
echo "* Push ${DOCKER_TAG} success" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Manual trigger vcpkg-cache docker image build | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
logLevel: | ||
description: 'Log level' | ||
required: true | ||
default: 'warning' | ||
tags: | ||
description: 'the input tag' | ||
|
||
jobs: | ||
manual-build-vcpkg-cache-docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Get branch name | ||
uses: nelonoel/[email protected] | ||
- name: Fetch tag | ||
run: | | ||
git fetch --tags --force | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_FISCOPR_USER }} | ||
password: ${{ secrets.DOCKER_FISCOPR_TOKEN }} | ||
|
||
# the model image | ||
- name: Build and Push wedpr-component-vcpkg-cache images | ||
run: | | ||
echo "* Manual build wedpr-component-vcpkg-cache image, docker version: ${{ github.event.inputs.tags }}" | ||
DOCKER_TAG=wedpr-component-vcpkg-cache:${{ github.event.inputs.tags }} | ||
echo "* Begin to build ${DOCKER_TAG}" | ||
cd WeDPR-Component/docker-files/cpp/vcpkg | ||
docker build docker build -t ${DOCKER_TAG} . | ||
echo "* Build ${DOCKER_TAG} success" | ||
docker push ${DOCKER_TAG} | ||
echo "* Push ${DOCKER_TAG} success" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM wedpr_component_vcpkg_cache:latest as builder | ||
FROM wedpr-component-vcpkg-cache:latest as builder | ||
|
||
LABEL maintainer [email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM ubuntu:18.04 as wedpr_component_vcpkg_cache | ||
FROM ubuntu:18.04 as wedpr-component-vcpkg-cache | ||
|
||
LABEL maintainer [email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
echo "* build image: wedpr_component_vcpkg_cache, branch: ${1}" | ||
docker build --build-arg SOURCE_BRANCH=${1} -t wedpr_component_vcpkg_cache . | ||
echo "* build image: wedpr_component_vcpkg_cache success, branch: ${1}" | ||
echo "* build image: wedpr-component-vcpkg-cache, branch: ${1}" | ||
docker build --build-arg SOURCE_BRANCH=${1} -t wedpr-component-vcpkg-cache . | ||
echo "* build image: wedpr-component-vcpkg-cache success, branch: ${1}" |