This repository has been archived by the owner on Jan 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
65 lines (65 loc) · 2.79 KB
/
dev.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
63
64
65
name: arkid-fe v2 cicd
on:
push:
branches:
- v2-dev
jobs:
dev2test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login harbor
uses: docker/login-action@v1
with:
registry: harbor.longguikeji.com
username: ${{ secrets.HARBORUSER }}
password: ${{ secrets.HARBORPWD }}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUBUSERNAME }}
password: ${{ secrets.DOCKERHUBPWD }}
- id: get-short-id
run: |
id=$(echo ${{github.sha}})
echo "::set-output name=id::${id: 0 :8}"
- run: echo "${{steps.get-short-id.outputs.id}}"
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
push: true
tags: |
${{ secrets.ARK_DEV }}/arkid-fe:v2dev-${{ github.run_number }}-${{steps.get-short-id.outputs.id}}
${{ secrets.ARK_DEV }}/arkid-fe:v2dev-${{ github.run_number }}
longguikeji/arkid-fe:v2dev-${{ github.run_number }}
longguikeji/arkid-fe:v2dev
# - name: deploy to cluster
# uses: steebchen/[email protected]
# with: # defaults to latest kubectl binary version
# config: ${{ secrets.KUBE_CONFIG_LG }}
# command: -n dev-arkidv2saas --insecure-skip-tls-verify=true set image --record deployment/dev-arkidv2saas-fe arkid-fe=${{ secrets.ARK_DEV }}/arkid-fe:v2dev-${{ github.run_number }}
- name: Feishu 报忧
if: ${{ failure() }}
uses: wangsijie/feishu-bot@v1
with:
uuid: ${{ secrets.FEISHU_UUID }}
data: |
{"msg_type":"post","content":{"post":{"zh_cn":{"title":"${{ github.event.repository.name }} v2 vue2 镜像构建通知",
"content":[[{"tag":"text","text":"${{ github.event.repository.name }} v2 vue2 镜像构建通知: "},
{"tag":"a","text":"${{ github.event.ref }} 分支构建失败,点击查看具体日志","href":"https://github.com/longguikeji/arkid-frontend/actions/workflows/dev.yml"}]]}}}}
- name: Feishu 报喜
if: ${{ success() }}
uses: wangsijie/feishu-bot@v1
with:
uuid: ${{ secrets.FEISHU_UUID }}
data: |
{"msg_type":"post","content":{"post":{"zh_cn":{"title": "${{ github.event.repository.name }} v2 vue2 镜像构建通知",
"content":[[{"tag":"text","text":"${{ github.event.repository.name }} v2 vue2 镜像构建通知: "},
{"tag":"a","text":"${{ github.event.ref }} 分支镜像构建成功:longguikeji/arkid-fe:v2dev-${{ github.run_number }}","href":"https://arkidv2saas.dev.longguikeji.com/"}]]}}}}