forked from tikv/pd
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 1.53 KB
/
check-dashboard.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
on:
push:
branches:
- master
- release-4.0
- release-5.0
paths:
- "go.mod"
pull_request:
branches:
- master
- release-4.0
- release-5.0
paths:
- "go.mod"
name: TiDB Dashboard
jobs:
build:
name: Check UI up-to-date
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- uses: actions/setup-go@v1
with:
go-version: "1.13.5"
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Fetch Go module
run: |
go mod download
DASHBOARD_DIR=$(go list -f "{{.Dir}}" -m github.com/pingcap/tidb-dashboard)
DASHBOARD_RELEASE_VERSION=$(grep -v '^#' "${DASHBOARD_DIR}/release-version")
echo DASHBOARD_DIR="$DASHBOARD_DIR" >> $GITHUB_ENV
echo DASHBOARD_RELEASE_VERSION="$DASHBOARD_RELEASE_VERSION" >> $GITHUB_ENV
- name: Fetch UI source specified by release version
run: |
rm -rf /tmp/dashboard
mkdir -p /tmp/dashboard
cd /tmp/dashboard
DOWNLOAD_URL="https://github.com/pingcap/tidb-dashboard/archive/v${DASHBOARD_RELEASE_VERSION}.zip"
curl -L "${DOWNLOAD_URL}" --fail --output source.zip
unzip source.zip
- name: Check diff
run: |
diff -qr ${DASHBOARD_DIR}/ui/ /tmp/dashboard/tidb-dashboard-${DASHBOARD_RELEASE_VERSION}/ui/