reference change #96
Workflow file for this run
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
# 构建和部署用于阿里云函数计算的 image | |
name: FunctionsBuildAndDeploy | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
# TODO: dotnet test | |
build_and_push: | |
name: BuildAndPushDockerImages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
- name: Log in to Github Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Log in to Aliyun Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: registry.cn-hangzhou.aliyuncs.com | |
username: yngdieng-azdo@zingzeu | |
password: ${{ secrets.ALIYUN_REGISTRY_PASSWORD }} | |
- name: Build and push to registry | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./ | |
file: ./dotnet/src/ZingzeuOrg.Yngdieng.Web/Dockerfile | |
push: true | |
build-args: | | |
VERSION_TAG=ci-g$(Build.BuildNumber)+$(Build.SourceVersion) | |
NUGET_REGISTRY_USERNAME=${{ secrets.ZINGZEU_NUGET_REGISTRY_USERNAME }} | |
NUGET_REGISTRY_PASSWORD=${{ secrets.ZINGZEU_NUGET_REGISTRY_PASSWORD }} | |
tags: | | |
ghcr.io/mindonglab/yngdieng-mono:ci-${{ github.run_number }} | |
ghcr.io/mindonglab/yngdieng-mono:latest | |
registry.cn-hangzhou.aliyuncs.com/zingzeu/yngdieng-mono:ci-${{ github.run_number }} | |
deploy_qa: | |
name: DeployToQa | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 12 | |
registry-url: https://registry.npmjs.org/ | |
- run: npm install -g @serverless-devs/s | |
- run: s config add --AccountID ${{secrets.ALIYUN_ORG_ACCOUNT_ID}} --AccessKeyID ${{secrets.ALIYUN_ACCESSKEY_ID}} --AccessKeySecret ${{secrets.ALIYUN_ACCESSKEY_SECRET}} -a default | |
- run: | | |
pushd dotnet/src/ZingzeuOrg.Yngdieng.Web && \ | |
s deploy --use-remote |