This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (49 loc) · 1.92 KB
/
push-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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 }}"}'