-
Notifications
You must be signed in to change notification settings - Fork 1
89 lines (74 loc) · 2.74 KB
/
linux.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Test in Linux Distributions
on:
push:
tags:
- "v*"
# branches:
# - master
pull_request:
branches:
- master
# schedule:
# - cron: "0 2 * * *"
jobs:
on-success:
needs: test
runs-on: ubuntu-latest
container: whatwewant/zmicro:v1
if: ${{ always() && needs.test.result == 'success' }}
steps:
- name: Notification Feishu
uses: whatwewant/[email protected]
with:
url: ${{ secrets.WORKFLOW_FEISHU_BOT_WEBHOOK_URL }}
title: "✅ 测试 Linux 发行版:${{ github.repository }}"
text: |
分支: ${{ github.ref }}
提交信息: ${{ github.event.head_commit.message }}
提交人: ${{ github.actor }}
状态: 构建成功(https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
on-failure:
needs: test
runs-on: ubuntu-latest
container: whatwewant/zmicro:v1
if: ${{ always() && needs.test.result == 'failure' }}
steps:
- name: Notification Feishu
uses: whatwewant/[email protected]
with:
url: ${{ secrets.WORKFLOW_FEISHU_BOT_WEBHOOK_URL }}
title: "❌ 测试 Linux 发行版:${{ github.repository }}"
text: |
分支: ${{ github.ref }}
提交信息: ${{ github.event.head_commit.message }}
提交人: ${{ github.actor }}
状态: 构建失败(https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
test:
runs-on: ubuntu-latest
# container: whatwewant/zmicro:v1
container: whatwewant/go-idp-pipeline:latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
# - name: Setup Docker
# uses: zmicro-design/action-setup-docker@v1
# - name: Install in ubuntu
# run: docker build -t zmicro:ubuntu -f config/docker/Dockerfile.ubuntu .
# - name: Install in alpine
# run: docker build -t zmicro:alpine -f config/docker/Dockerfile.alpine .
# - name: Install in centos
# run: docker build -t zmicro:centos -f config/docker/Dockerfile.centos .
# # - name: Install in fedora
# # run: docker build -t zmicro:fedora -f config/docker/Dockerfile.fedora .
# - name: Install in archlinux
# run: docker build -t zmicro:archlinux -f config/docker/Dockerfile.archlinux .
# - name: Install in debian
# run: docker build -t zmicro:debian -f config/docker/Dockerfile.debian .
- name: Install Docker Buildx
run: zmicro package install docker-buildx
- name: Run Pipeline
# run: pipeline run
uses: zmicro-design/action-pipeline@v1
env:
GITHUB_TOKEN: ${{ github.token }}