You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- name: "upload_deploy"
-
- ###############################################################################
- # This ci is skipped in THUAI6 for THUAI6 use cloud disk to distribute.
- # To use automatically distribution, comment out `if: false` in the following
- # two jobs.
- ###############################################################################
-
- on:
- push:
- branches: [ master, dev ]
-
- jobs:
- build_upload:
- runs-on: windows-latest
- if: false # Skip this job
- steps:
- - uses: actions/checkout@v1
-
- - name: Install SSH
- uses: shimataro/ssh-key-action@v2
- with:
- key: ${{ secrets.SSH_PRIVATE_KEY }}
- known_hosts: 127.0.0.1
-
- - name: Setup dotnet Core
- uses: actions/setup-dotnet@v1
- with:
- dotnet-version: 6.0.x
-
- - name: Setup Python
- uses: actions/setup-python@v2
- with:
- python-version: '3.9.2'
- architecture: 'x64'
-
- - name: Git Submodule
- run: git submodule update --init --recursive
-
- - name: Pip Install paramiko
- run: pip install paramiko
-
- - name: Publish
- run: |
- New-Item -Path . -Name "THUAI6" -ItemType "directory"
- cmd /c ./dependency/shell/publish.cmd
- python ./dependency/py/upload.py --id 118.195.131.159 --key ${{ secrets.SERVER_PASSWORD }} CAPI THUAI6
-
- deploy:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v1
-
- - name: make directory
- run: mkdir ./Server
-
- - name: Log in to DockerHub
- run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
-
- - name: Setup .NET Core
- uses: actions/setup-dotnet@v1
- with:
- dotnet-version: 6.0.x
-
- - name: Git Submodule
- run: pushd ./CAPI && git submodule update --init --recursive && popd
-
- - name: Build CAPI_compile docker image
- run: docker build -t ${{ secrets.DOCKER_USERNAME }}/thuai6_compiler:latest -f ./dependency/Dockerfile/Dockerfile_compile .
- - name: Push CAPI_compile image to DockerHub
- run: docker push ${{ secrets.DOCKER_USERNAME }}/thuai6_compiler:latest
-
- - name: Publish server
- run: dotnet publish "./logic/Server/Server.csproj" -c Release -r linux-x64 --self-contained true -o ./Server
- - name: Build runner docker image
- run: docker build -t ${{ secrets.DOCKER_USERNAME }}/thuai6_runner:latest -f ./dependency/Dockerfile/Dockerfile_run .
- - name: Push runner image to DockerHub
- run: docker push ${{ secrets.DOCKER_USERNAME }}/thuai6_runner:latest
|