diff --git a/.github/workflows/deploy-use-ecs.yml b/.github/workflows/deploy-use-ecs.yml index 3a402e4b0..e6d885d54 100644 --- a/.github/workflows/deploy-use-ecs.yml +++ b/.github/workflows/deploy-use-ecs.yml @@ -33,6 +33,10 @@ jobs: - name: Set IMAGE_TAG environment variable run: echo "IMAGE_TAG=$(echo ${{ github.sha }} | cut -c 1-7)" >> $GITHUB_ENV + - name: Set FEATURE environment variable + if: ${{ startsWith(github.event_name == 'schedule' && 'staging' || inputs.environment, 'feature') }} + run: echo "FEATURE=$(echo "${GITHUB_REF#refs/heads/feat/}")" >> "$GITHUB_ENV" + - name: Set US ACR region if: ${{ inputs.acr-region == 'us-east-1' || inputs.environment == 'prod' || inputs.environment == 'feature prod' }} run: | @@ -41,16 +45,24 @@ jobs: - uses: peter-evans/repository-dispatch@v4 with: token: ${{ secrets.GH_TOKEN }} - repository: dream-num/helm-chart-private + repository: dream-num/runner-machine 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 }}" + "next_posthog_apikey": "${{ secrets.NEXT_POSTHOG_APIKEY }}", + "machine": { + "instance_size": "16c32g", + "region":"us-virginia", + "internet_bandwidth": "100" + }, + "helm_dispatch": { + "event": "${{ vars.DISPATCH_EVENT_TYPE }}", + "service": "univer-docs-site", + "feature": "${{ env.FEATURE }}" + } } diff --git a/Makefile b/Makefile index b84184592..d1e5d00ee 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ push_image: create_builder ifeq ($(PUSH_TAG), latest) $(eval image_tag=-t $(CR)/$(NS)/$(REPOSITORY):latest) else - $(eval image_tag=-t $(CR)/$(NS)/$(REPOSITORY):$(PUSH_TAG) -t $(CR)/$(NS)/$(REPOSITORY):latest) + $(eval image_tag=-t $(CR)/$(NS)/$(REPOSITORY):$(PUSH_TAG)) endif $(CTR) buildx build \ --build-arg CR=$(CR) \ @@ -35,6 +35,7 @@ endif --build-arg NEXT_PUBLIC_DOCS_SOURCE_REF=$(NEXT_PUBLIC_DOCS_SOURCE_REF) \ --builder $(BUILDER) \ --platform $(OSARCH) \ + --progress=plain \ --file Dockerfile \ $(image_tag) \ --push .