-
Notifications
You must be signed in to change notification settings - Fork 36
85 lines (77 loc) · 2.35 KB
/
tag.yaml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Tag
on:
push:
tags:
- 'v1.*'
- 'e1.*'
jobs:
set_version:
runs-on: ubuntu-latest
outputs:
emqx-name: ${{ steps.set-output.outputs.emqx-name }}
steps:
- name: check branch and set output
id: set-output
run: |
if [[ "${{ github.base_ref }}" == enterprise ]]; then
echo "emqx-name=emqx-enterprise" >> "$GITHUB_OUTPUT"
else
echo "emqx-name=emqx" >> "$GITHUB_OUTPUT"
fi
build_emqx_for_test:
needs:
- set_version
uses: ./.github/workflows/build_emqx_for_test.yaml
with:
emqx-name: ${{ needs.set_version.outputs.emqx-name }}
check_package_version:
needs:
- set_version
- build_emqx_for_test
uses: ./.github/workflows/check_package_version.yaml
with:
emqx-name: ${{ needs.set_version.outputs.emqx-name }}
build_ce_dashboard_package:
needs:
- check_package_version
if: startsWith(github.ref, 'refs/tags/v')
uses: ./.github/workflows/build_oss_package.yaml
build_ee_dashboard_package:
needs:
- check_package_version
if: (github.ref == 'refs/heads/enterprise') || startsWith(github.ref, 'refs/tags/e')
uses: ./.github/workflows/build_enterprise_package.yaml
bump_ce_dashboard_version:
needs:
- set_version
- check_package_version
- build_ce_dashboard_package
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Create PR in emqx/emqx
env:
GH_TOKEN: ${{ secrets.CI_GITHUB_TOKEN_EMQX_RW }}
EMQX_NAME: emqx
VERSION: ${{ github.ref_name }}
run: |
gh --repo emqx/emqx workflow run bump-dashboard-version.yaml \
-f emqx-name=${EMQX_NAME} \
-f version=${VERSION}
bump_ee_dashboard_version:
needs:
- set_version
- check_package_version
- build_ee_dashboard_package
if: (github.ref == 'refs/heads/enterprise') || startsWith(github.ref, 'refs/tags/e')
runs-on: ubuntu-latest
steps:
- name: Create PR in emqx/emqx
env:
GH_TOKEN: ${{ secrets.CI_GITHUB_TOKEN_EMQX_RW }}
EMQX_NAME: emqx-enterprise
VERSION: ${{ github.ref_name }}
run: |
gh --repo emqx/emqx workflow run bump-dashboard-version.yaml \
-f emqx-name=${EMQX_NAME} \
-f version=${VERSION}