BiWeekly Release Docker #23
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
name: BiWeekly Release Docker | |
on: | |
#pull_request: | |
#branchs: [ main ] | |
schedule: | |
- cron: '0 3 22 * *' # GMT time, 3:00 GMT == 11:00 China Every 22th in a month | |
- cron: '0 3 8 * *' # GMT time, 3:00 GMT == 11:00 China Every 22th in a month | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'docker image tag (e.g. 2.1.0-SNAPSHOT)' | |
required: true | |
default: 'latest' | |
type: string | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
docker-build-bigdl-weekly: | |
runs-on: [self-hosted, Shire] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: docker login | |
run: | | |
docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_PASSWORD} | |
- name: docker deploy bigdl-k8s | |
run: | | |
cd docker/bigdl-k8s | |
export IMAGE=intelanalytics/bigdl-k8s | |
export TIMESTAMP=`date '+%Y%m%d'` | |
export TAG=2.5.0-SNAPSHOT-${TIMESTAMP} | |
echo "########################################" | |
echo "################# bigdl-k8s 3.1.3 #######" | |
echo "########################################" | |
docker build \ | |
--build-arg http_proxy=${HTTP_PROXY} \ | |
--build-arg https_proxy=${HTTPS_PROXY} \ | |
--build-arg SPARK_VERSION=3.1.3 \ | |
--build-arg JDK_VERSION=8u192 \ | |
--build-arg JDK_URL=${JDK_URL} \ | |
--build-arg no_proxy=${NO_PROXY} \ | |
--rm --no-cache -t ${IMAGE}-spark-3.1.3:${TAG} . | |
docker push ${IMAGE}-spark-3.1.3:${TAG} | |
docker tag ${IMAGE}-spark-3.1.3:${TAG} ${IMAGE}:${TAG} | |
docker push ${IMAGE}:${TAG} | |
docker tag ${IMAGE}:${TAG} 10.239.45.10/arda/${IMAGE}-spark-3.1.3:${TAG} | |
docker push 10.239.45.10/arda/${IMAGE}-spark-3.1.3:${TAG} | |
docker rmi -f ${IMAGE}-spark-3.1.3:${TAG} 10.239.45.10/arda/${IMAGE}-spark-3.1.3:${TAG} | |