1
+ name : Dashboard image
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - " master"
7
+ paths-ignore :
8
+ - " cmd/playground/**"
9
+ - " cmd/agent/**"
10
+ - " script/**"
11
+ - " *.md"
12
+ - " .*"
13
+ - " .github/workflows/agent.yml"
14
+
15
+ jobs :
16
+ deploy :
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - uses : actions/checkout@master
20
+
21
+ - name : Log in to the GHCR
22
+ uses : docker/login-action@master
23
+ with :
24
+ registry : ghcr.io
25
+ username : ${{ github.repository_owner }}
26
+ password : ${{ secrets.GITHUB_TOKEN }}
27
+
28
+ - name : Login to Docker Hub
29
+ uses : docker/login-action@master
30
+ with :
31
+ username : ${{ secrets.DOC_USER }}
32
+ password : ${{ secrets.DOC_PAT }}
33
+
34
+ - name : Log in to the AliyunCS
35
+ uses : docker/login-action@master
36
+ with :
37
+ registry : registry.cn-shanghai.aliyuncs.com
38
+ username : ${{ secrets.ALI_USER }}
39
+ password : ${{ secrets.ALI_PAT }}
40
+
41
+ - name : Set up QEMU
42
+ uses : docker/setup-qemu-action@v1
43
+
44
+ - name : Set up Docker Buildx
45
+ uses : docker/setup-buildx-action@v1
46
+
47
+ - name : Set up image name
48
+ run : |
49
+ GHRC_IMAGE_NAME=$(echo "ghcr.io/${{ github.repository_owner }}/probe-lite-dashboard" | tr '[:upper:]' '[:lower:]')
50
+ DOC_IMAGE_NAME=$(echo "nangle/probe-lite-dashboard" | tr '[:upper:]' '[:lower:]')
51
+ if [ ${{ github.repository_owner }} = "xOS" ]
52
+ then ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/dns/probe-lite-dashboard")
53
+ else ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/${{ github.repository_owner }}/probe-lite-dashboard" | tr '[:upper:]' '[:lower:]')
54
+ fi
55
+ echo "::set-output name=GHRC_IMAGE_NAME::$GHRC_IMAGE_NAME"
56
+ echo "::set-output name=ALI_IMAGE_NAME::$ALI_IMAGE_NAME"
57
+ echo "::set-output name=DOC_IMAGE_NAME::$DOC_IMAGE_NAME"
58
+ id : image-name
59
+
60
+ - name : Build dasbboard image And Push
61
+ uses : docker/build-push-action@v2
62
+ with :
63
+ context : .
64
+ file : ./Dockerfile
65
+ platforms : linux/amd64,linux/arm64,linux/arm,linux/386
66
+ push : true
67
+ tags : |
68
+ ${{ steps.image-name.outputs.ALI_IMAGE_NAME }}
69
+ ${{ steps.image-name.outputs.DOC_IMAGE_NAME }}
70
+ ${{ steps.image-name.outputs.GHRC_IMAGE_NAME }}
71
+
72
+ - name : Purge jsdelivr cache
73
+ run : |
74
+ curl -s https://purge.jsdelivr.net/gh/${{ github.repository_owner }}/probe-lite@master/script/probe.sh
75
+ curl -s https://purge.jsdelivr.net/gh/${{ github.repository_owner }}/probe-lite@master/script/probe-agent-lite.service
76
+ curl -s https://purge.jsdelivr.net/gh/${{ github.repository_owner }}/probe-lite@master/script/docker-compose.yaml
77
+ curl -s https://purge.jsdelivr.net/gh/${{ github.repository_owner }}/probe-lite@master/script/config.yaml
78
+ LOWER_USERNAME=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
79
+ curl -s https://purge.jsdelivr.net/gh/$LOWER_USERNAME/probe-lite@master/script/probe.sh
80
+ curl -s https://purge.jsdelivr.net/gh/$LOWER_USERNAME/probe-lite@master/script/probe-agent-lite.service
81
+ curl -s https://purge.jsdelivr.net/gh/$LOWER_USERNAME/probe-lite@master/script/docker-compose.yaml
82
+ curl -s https://purge.jsdelivr.net/gh/$LOWER_USERNAME/probe-lite@master/script/config.yaml
83
+ curl -s https://purge.jsdelivr.net/gh/xos/probe-lite@master/resource/static/bg/background.jpeg
84
+ curl -s https://purge.jsdelivr.net/gh/xos/probe-lite@master/resource/static/favicon.ico
85
+ curl -s https://purge.jsdelivr.net/gh/xos/probe-lite@master/resource/static/logo.png
86
+ curl -s https://purge.jsdelivr.net/gh/xos/probe-lite@master/resource/static/main.css
87
+ curl -s https://purge.jsdelivr.net/gh/xos/probe-lite@master/resource/static/main.js
88
+ curl -s https://purge.jsdelivr.net/gh/xos/probe-lite@master/resource/static/semantic-ui-alerts.min.css
89
+ curl -s https://purge.jsdelivr.net/gh/xos/probe-lite@master/resource/static/semantic-ui-alerts.min.js
0 commit comments