🕶️ Deploy Using ECS #1
This file contains hidden or 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: 🕶️ Deploy Using ECS | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: Environment to deploy | |
| required: true | |
| default: staging | |
| type: environment | |
| acr-region: | |
| description: ACR registry | |
| type: choice | |
| default: cn-shenzhen | |
| options: | |
| - cn-shenzhen | |
| - us-east-1 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| push: | |
| runs-on: ubuntu-latest | |
| environment: ${{ github.event.inputs.environment }} | |
| env: | |
| CR: univer-acr-registry.cn-shenzhen.cr.aliyuncs.com | |
| steps: | |
| - name: Set IMAGE_TAG environment variable | |
| run: echo "IMAGE_TAG=$(echo ${{ github.sha }} | cut -c 1-7)" >> $GITHUB_ENV | |
| - name: Set US ACR region | |
| if: ${{ inputs.acr-region == 'us-east-1' || inputs.environment == 'prod' || inputs.environment == 'feature prod' }} | |
| run: | | |
| echo "CR=univer-acr-eastus-registry.us-east-1.cr.aliyuncs.com" >> "$GITHUB_ENV" | |
| - uses: peter-evans/repository-dispatch@v4 | |
| with: | |
| token: ${{ secrets.GH_TOKEN }} | |
| repository: dream-num/helm-chart-private | |
| event-type: create-ci | |
| client-payload: > | |
| { | |
| "service": "documentation", | |
| "git_ref": "${{ github.ref }}", | |
| "instance_size": "32c64g", | |
| "region":"us-virginia", | |
| "image_tag": "${{ env.IMAGE_TAG }}", | |
| "cr": "${{ env.CR }}", | |
| "next_public_docs_source_ref": "${{ github.ref_name }}", | |
| "next_posthog_apikey": "${{ secrets.NEXT_POSTHOG_APIKEY }}" | |
| } |