This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
π Push Univer Examples #20
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
name: π Push Univer Examples | |
on: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-docker-image: | |
name: Build Docker Image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Setup Node.js | |
uses: ./.github/actions/setup-node | |
- name: Run build task | |
run: | | |
pnpm build | |
- name: Login to Aliyun Container Registry (ACR) | |
uses: aliyun/acr-login@v1 | |
with: | |
login-server: univer-acr-registry.cn-shenzhen.cr.aliyuncs.com | |
region-id: cn-shenzhen | |
username: '${{ vars.REGISTRY_USERNAME }}' | |
password: '${{ secrets.REGISTRY_PASSWORD }}' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and Push Docker Image | |
run: | | |
IMAGE_TAG=$(echo "${{ github.sha }}" | cut -c 1-7) | |
make push_image NS=univer PUSH_TAG=$IMAGE_TAG BUILDER=${{ steps.buildx.outputs.name }} | |
deploy: | |
name: Deploy | |
needs: build-docker-image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set IMAGE_TAG environment variable | |
run: echo "IMAGE_TAG=$(echo ${{ github.sha }} | cut -c 1-7)" >> $GITHUB_ENV | |
- uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
repository: dream-num/helm-charts | |
event-type: dispatch | |
client-payload: '{"service":"univer-examples","tag":"${{ env.IMAGE_TAG }}"}' |