forked from FederatedAI/FATE
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Update script to reduce the size of images by splitting nn and non-nn. 2. Add github action workflow to build and push images on master changed or tagged. Signed-off-by: jiahaoc <[email protected]>
- Loading branch information
1 parent
23ad848
commit 716d279
Showing
5 changed files
with
238 additions
and
206 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Docker | ||
|
||
on: | ||
push: | ||
# Publish `master` as Docker `latest` image. | ||
branches: | ||
- master | ||
|
||
# Publish `v1.2.3` tags as releases. | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
# no test is required | ||
push: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Prepare the TAG | ||
id: prepare-the-tag | ||
run: | | ||
# strip git ref prefix from version | ||
TAG="" | ||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | ||
if [ $VERSION = "master" ]; then | ||
TAG=latest | ||
fi | ||
echo "::set-output name=tag::$TAG" | ||
- name: Build image | ||
run: TAG=${{steps.prepare-the-tag.outputs.tag}} bash docker-build/build_cluster_docker.sh all | ||
|
||
- name: Log into DockerHub | ||
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Push image | ||
run: TAG=${{steps.prepare-the-tag.outputs.tag}} bash docker-build/build_cluster_docker.sh push |
Oops, something went wrong.