forked from vectordotdev/vector
-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (104 loc) · 4.32 KB
/
comment-trigger.yml
File metadata and controls
118 lines (104 loc) · 4.32 KB
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
# Comment Trigger
#
# This workflow is a central point for triggering workflow runs that normally run only as part of the merge queue,
# on demand by a comment. The exception being the integration tests, which have their own workflow file for
# comment triggers as the logic is a bit more complex.
#
# The available triggers are:
#
# /ci-run-all : runs all of the below
# /ci-run-cli : runs CLI - Linux
# /ci-run-misc : runs Miscellaneous - Linux
# /ci-run-component-features : runs Component Features - Linux
# /ci-run-cross : runs Cross
# /ci-run-unit-mac : runs Unit - Mac
# /ci-run-unit-windows : runs Unit - Windows
# /ci-run-environment : runs Environment Suite
# /ci-run-install : runs Update install.sh Suite
# /ci-run-regression : runs Regression Detection Suite
name: Comment Trigger
on:
issue_comment:
types: [created]
env:
DD_ENV: "ci"
RUST_BACKTRACE: full
TEST_LOG: vector=debug
VERBOSE: true
CI: true
PROFILE: debug
# observing issues fetching boringssl via HTTPS in the OSX build, seeing if this helps
# can be removed when we switch back to the upstream openssl-sys crate
CARGO_NET_GIT_FETCH_WITH_CLI: true
concurrency:
group: ${{ github.workflow }}-${{ github.event.issue_comment.issue.id }}-${{ github.event.comment.body }}
cancel-in-progress: true
jobs:
validate:
name: Validate comment
runs-on: ubuntu-latest
if: |
github.event.issue.pull_request && ( contains(github.event.comment.body, '/ci-run-all')
|| contains(github.event.comment.body, '/ci-run-cli')
|| contains(github.event.comment.body, '/ci-run-misc')
|| contains(github.event.comment.body, '/ci-run-component-features')
|| contains(github.event.comment.body, '/ci-run-cross')
|| contains(github.event.comment.body, '/ci-run-unit-mac')
|| contains(github.event.comment.body, '/ci-run-unit-windows')
|| contains(github.event.comment.body, '/ci-run-environment')
|| contains(github.event.comment.body, '/ci-run-install')
|| contains(github.event.comment.body, '/ci-run-regression')
)
steps:
- name: Validate issue comment
id: comment
uses: tspascoal/get-user-teams-membership@v2
with:
username: ${{ github.actor }}
team: 'Vector'
GITHUB_TOKEN: ${{ secrets.GH_PAT_ORG }}
cli:
needs: validate
if: contains(github.event.comment.body, '/ci-run-all') || contains(github.event.comment.body, '/ci-run-cli')
uses: ./.github/workflows/cli.yml
secrets: inherit
misc:
needs: validate
if: contains(github.event.comment.body, '/ci-run-all') || contains(github.event.comment.body, '/ci-run-misc')
uses: ./.github/workflows/misc.yml
secrets: inherit
component-features:
needs: validate
if: contains(github.event.comment.body, '/ci-run-all') || contains(github.event.comment.body, '/ci-run-component-features')
uses: ./.github/workflows/component_features.yml
secrets: inherit
cross:
needs: validate
if: contains(github.event.comment.body, '/ci-run-all') || contains(github.event.comment.body, '/ci-run-cross')
uses: ./.github/workflows/cross.yml
secrets: inherit
unit-mac:
needs: validate
if: contains(github.event.comment.body, '/ci-run-all') || contains(github.event.comment.body, '/ci-run-unit-mac')
uses: ./.github/workflows/unit_mac.yml
secrets: inherit
unit-windows:
needs: validate
if: contains(github.event.comment.body, '/ci-run-all') || contains(github.event.comment.body, '/ci-run-unit-windows')
uses: ./.github/workflows/unit_windows.yml
secrets: inherit
environment:
needs: validate
if: contains(github.event.comment.body, '/ci-run-all') || contains(github.event.comment.body, '/ci-run-environment')
uses: ./.github/workflows/environment.yml
secrets: inherit
install:
needs: validate
if: contains(github.event.comment.body, '/ci-run-all') || contains(github.event.comment.body, '/ci-run-install')
uses: ./.github/workflows/install-sh.yml
secrets: inherit
regression:
needs: validate
if: contains(github.event.comment.body, '/ci-run-all') || contains(github.event.comment.body, '/ci-run-regression')
uses: ./.github/workflows/regression.yml
secrets: inherit