-
Notifications
You must be signed in to change notification settings - Fork 0
140 lines (132 loc) · 7.79 KB
/
ci.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: CI
on:
push:
branches:
- master
- integration
- experimental*
- release_*
repository_dispatch:
types:
- metwork-trigger*
env:
WORKFLOW_SCRIPTS_DIR: .github/workflows
DOCKER_WORKFLOW_SCRIPTS_DIR: /src/.github/workflows
PAYLOAD_BRANCH: ${{ github.event.client_payload.branch}}
PAYLOAD_OS: ${{ github.event.client_payload.os}}
jobs:
ci_build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.client_payload.branch || github.ref }}
- name: set variables
id: SetVariables
run: |
${WORKFLOW_SCRIPTS_DIR}/set_variables.sh
- name: debug env
run: |
env
echo "Dockerfile"
cat ./Dockerfile
- name: docker build and push
id: DockerStep
env:
BRANCH: ${{ steps.SetVariables.outputs.branch }}
CACHEBUST: ${{ github.run_number }}
TAG_BRANCH: ${{ steps.SetVariables.outputs.tag_branch }}
TAG_LATEST: ${{ steps.SetVariables.outputs.tag_latest }}
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
${WORKFLOW_SCRIPTS_DIR}/docker_build.sh
- name: dispatch mfserv
if: ${{ github.event_name != 'pull_request' && steps.SetVariables.outputs.branch != 'null' && steps.DockerStep.outputs.dispatch_bypass == 'false' && steps.SetVariables.outputs.os == 'centos8' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.METWORK_ACCESS_TOKEN }}
repository: metwork-framework/mfserv
event-type: metwork-trigger-${{ steps.SetVariables.outputs.branch }}
client-payload: '{"branch": "${{ steps.SetVariables.outputs.branch }}", "os": "centos8"}'
- name: dispatch mfdata
if: ${{ github.event_name != 'pull_request' && steps.SetVariables.outputs.branch != 'null' && steps.DockerStep.outputs.dispatch_bypass == 'false' && steps.SetVariables.outputs.os == 'centos8' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.METWORK_ACCESS_TOKEN }}
repository: metwork-framework/mfdata
event-type: metwork-trigger-${{ steps.SetVariables.outputs.branch }}
client-payload: '{"branch": "${{ steps.SetVariables.outputs.branch }}", "os": "centos8"}'
- name: dispatch mfbase
if: ${{ github.event_name != 'pull_request' && steps.SetVariables.outputs.branch != 'null' && steps.DockerStep.outputs.dispatch_bypass == 'false' && steps.SetVariables.outputs.os == 'centos8' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.METWORK_ACCESS_TOKEN }}
repository: metwork-framework/mfbase
event-type: metwork-trigger-${{ steps.SetVariables.outputs.branch }}
client-payload: '{"branch": "${{ steps.SetVariables.outputs.branch }}", "os": "centos8"}'
- name: dispatch mfadmin
if: ${{ github.event_name != 'pull_request' && steps.SetVariables.outputs.branch != 'null' && steps.DockerStep.outputs.dispatch_bypass == 'false' && steps.SetVariables.outputs.os == 'centos8' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.METWORK_ACCESS_TOKEN }}
repository: metwork-framework/mfadmin
event-type: metwork-trigger-${{ steps.SetVariables.outputs.branch }}
client-payload: '{"branch": "${{ steps.SetVariables.outputs.branch }}", "os": "centos8"}'
- name: dispatch mfsysmon
if: ${{ github.event_name != 'pull_request' && steps.SetVariables.outputs.branch != 'null' && steps.DockerStep.outputs.dispatch_bypass == 'false' && steps.SetVariables.outputs.os == 'centos8' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.METWORK_ACCESS_TOKEN }}
repository: metwork-framework/mfsysmon
event-type: metwork-trigger-${{ steps.SetVariables.outputs.branch }}
client-payload: '{"branch": "${{ steps.SetVariables.outputs.branch }}", "os": "centos8"}'
- name: dispatch mfextaddon_scientific
if: ${{ github.event_name != 'pull_request' && steps.SetVariables.outputs.branch != 'null' && steps.DockerStep.outputs.dispatch_bypass == 'false' && steps.SetVariables.outputs.os == 'centos8' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.METWORK_ACCESS_TOKEN }}
repository: metwork-framework/mfextaddon_scientific
event-type: metwork-trigger-${{ steps.SetVariables.outputs.branch }}
client-payload: '{"branch": "${{ steps.SetVariables.outputs.branch }}", "os": "centos8"}'
- name: dispatch mfextaddon_mapserver
if: ${{ github.event_name != 'pull_request' && steps.SetVariables.outputs.branch != 'null' && steps.DockerStep.outputs.dispatch_bypass == 'false' && steps.SetVariables.outputs.os == 'centos8' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.METWORK_ACCESS_TOKEN }}
repository: metwork-framework/mfextaddon_mapserver
event-type: metwork-trigger-${{ steps.SetVariables.outputs.branch }}
client-payload: '{"branch": "${{ steps.SetVariables.outputs.branch }}", "os": "centos8"}'
- name: dispatch mfextaddon_vim
if: ${{ github.event_name != 'pull_request' && steps.SetVariables.outputs.branch != 'null' && steps.DockerStep.outputs.dispatch_bypass == 'false' && steps.SetVariables.outputs.os == 'centos8' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.METWORK_ACCESS_TOKEN }}
repository: metwork-framework/mfextaddon_vim
event-type: metwork-trigger-${{ steps.SetVariables.outputs.branch }}
client-payload: '{"branch": "${{ steps.SetVariables.outputs.branch }}", "os": "centos8"}'
- name: dispatch mfextaddon_rabbitmq
if: ${{ github.event_name != 'pull_request' && steps.SetVariables.outputs.branch != 'null' && steps.DockerStep.outputs.dispatch_bypass == 'false' && steps.SetVariables.outputs.os == 'centos8' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.METWORK_ACCESS_TOKEN }}
repository: metwork-framework/mfextaddon_rabbitmq
event-type: metwork-trigger-${{ steps.SetVariables.outputs.branch }}
client-payload: '{"branch": "${{ steps.SetVariables.outputs.branch }}", "os": "centos8"}'
- name: dispatch mfextaddon_elasticsearch
if: ${{ github.event_name != 'pull_request' && steps.SetVariables.outputs.branch != 'null' && steps.SetVariables.outputs.branch != 'release_1.1' && steps.DockerStep.outputs.dispatch_bypass == 'false' && steps.SetVariables.outputs.os == 'centos8' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.METWORK_ACCESS_TOKEN }}
repository: metwork-framework/mfextaddon_elasticsearch
event-type: metwork-trigger-${{ steps.SetVariables.outputs.branch }}
client-payload: '{"branch": "${{ steps.SetVariables.outputs.branch }}", "os": "centos8"}'
- name: dispatch mfextaddon_php
if: ${{ github.event_name != 'pull_request' && steps.SetVariables.outputs.branch != 'null' && steps.SetVariables.outputs.branch != 'release_1.1' && steps.SetVariables.outputs.branch != 'release_2.0' && steps.DockerStep.outputs.dispatch_bypass == 'false' && steps.SetVariables.outputs.os == 'centos8' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.METWORK_ACCESS_TOKEN }}
repository: metwork-framework/mfextaddon_php
event-type: metwork-trigger-${{ steps.SetVariables.outputs.branch }}
client-payload: '{"branch": "${{ steps.SetVariables.outputs.branch }}", "os": "centos8"}'