Unity 机器学习代理工具包 (ML-Agents) 是一个开源项目,它使游戏和模拟能够作为训练智能代理的环境。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

46 行
1.9 KiB

name: build and push Docker image
on:
push:
tags:
- "release_[0-9]+"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '270.0.0'
service_account_email: ${{ secrets.GCP_STG_EMAIL }}
service_account_key: ${{ secrets.GCP_STG_PRIVATE_KEY }}
export_default_credentials: true
- name: Configure GCR Docker auth (stg)
run: gcloud auth configure-docker
- name: Build docker image
run: docker build --tag ml-agents:${GITHUB_SHA} --build-arg SHA=${GITHUB_SHA} .
- name: Tag docker image (stg)
run: |
docker tag ml-agents:${GITHUB_SHA} gcr.io/unity-ai-ml-agents-stg/ml-agents:${GITHUB_SHA}
docker tag ml-agents:${GITHUB_SHA} gcr.io/unity-ai-ml-agents-stg/ml-agents:latest
- name: Push docker image (stg)
run: |
docker push gcr.io/unity-ai-ml-agents-stg/ml-agents:${GITHUB_SHA}
docker push gcr.io/unity-ai-ml-agents-stg/ml-agents:latest
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '270.0.0'
service_account_email: ${{ secrets.GCP_PRD_EMAIL }}
service_account_key: ${{ secrets.GCP_PRD_PRIVATE_KEY }}
export_default_credentials: true
- name: Configure GCR Docker auth (prd)
run: gcloud auth configure-docker
- name: Tag docker image (prd)
run: |
docker tag ml-agents:${GITHUB_SHA} gcr.io/unity-ai-ml-agents-prd/ml-agents:${GITHUB_SHA}
docker tag ml-agents:${GITHUB_SHA} gcr.io/unity-ai-ml-agents-prd/ml-agents:latest
- name: Push docker image (prd)
run: |
docker push gcr.io/unity-ai-ml-agents-prd/ml-agents:${GITHUB_SHA}
docker push gcr.io/unity-ai-ml-agents-prd/ml-agents:latest